-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add usage logs index and search function. #2818
Conversation
* To change this template file, choose Tools | Templates | ||
* and open the template in the editor. | ||
*/ | ||
package cn.edu.pku.lib.util; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm seeing "[ERROR] Failed to execute goal org.eluder.coveralls:coveralls-maven-plugin:4.0.0:report (default-cli) on project dataverse: I/O operation failed: No source found for cn/edu/pku/lib/util/StringUtil.java -> [Help 1]" at https://travis-ci.org/IQSS/dataverse/builds/96229791#L3026
@bencomp and I are surprised that the Travis build passed: http://irclog.iq.harvard.edu/dataverse/2015-12-11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the package name without noticing it since I used the maven to build it successful. I am surprised too!
@pengchengluo interesting! Thanks! Since this pull request has been made against 4.3 I'll set the milestone to the same. @scolapasta said he'd take I a look so I'll put it in his name for now. Feedback from @bencomp includes, "there should be a discussion about how to modularise added functionality like this" http://irclog.iq.harvard.edu/dataverse/2015-12-11#i_28374 I share his concern about adding another component (Elasticsearch) even if it is a neat piece of technology. :) Anyway, neat stuff. It would be fun to deploy this code and poke around on a running system. |
Whoops! There is no 4.3 milestone yet! I'll try to remember to add tag this issue with it once it has been created. |
Uh oh. "This branch has conflicts that must be resolved". (I just merged 4.2.3 into 4.3.) |
My point for discussion relates in a way to #2617, as running Elasticsearch is pretty resource intensive, so having this in the main Dataverse release would require us to upgrade our hardware or think of a way to remove the functionality. So I would very much like this to be optional. Taking a look from a different angle: this adds more to Dataverse than corrections of a few typos, a fix for a bug or a new field in the user interface and requires at least to determine ownership of the code and responsibility for its maintenance. From this perspective too I would suggest to make it a plugin, created by @pengchengluo (or Peking University) and supported by Peking University, IQSS and/or the community. One problem is that Dataverse has no well-defined plugin system yet. But perhaps in this case, packaging the extra bits in a JAR and defining build profiles in the pom.xml could work? |
Hi, @bencomp. We agree with you that the function added by third party can be made a plugin. We would like to take the responsibility for its maintenance. Therefore, harvard dataverse has to define a plugin system. This will promote more people around the world to contribute their code for dataverse. |
@bencomp and I discussed plugin systems a bit at http://irclog.iq.harvard.edu/dataverse/2016-01-08 |
Some modules, such as DOI register, file access and usage statistic, should define interface. A configure file as the solr's schema.xml can be used to specify which implementation is selected. |
@pengchengluo thanks for this pull request, for your comments on interfaces, and for pushing code to https://github.com/pengchengluo/Peking-University-Open-Research-Data-Platform ! I just closed this pull request because I deleted the 4.3 branch since we'll be using the new "develop" branch instead to represent the next release per #2863 I'll definitely be checking out parts of the code in the repo you created. We'll be in touch about coordinating pull requests against "develop". Thanks for all your great work on Dataverse! http://opendata.pku.edu.cn is fantastic! |
This pull request is created for #2729. To deploy it, the elasticsearch 2.1.0 is requirement. After the elasticsearch 2.1.0 is running. An index must be created using the following command:
curl -XPUT 'http://localhost:9200/dataverse/' -d @usage-mapping.json
The usage-mapping.json is placed in the directory of 'conf/elasticsearch/2.1.0'
The events of browsing dataverse and dataset, login and logout, downloading file, requesting access file, rejecting the access file request and granting the access file request is logged. The logs is saved in the directory ' glassfish4/glassfish/domains/domain1/logs/usage/' and indexed in the elasticsearch.
Users who has 'ManageDataversePermissions' or 'ManageDatasetPermissions' can view the logs.