Skip to content

RYA-253 Converted the rya.prospector class from Groovy to Java. Also added documentation to the project.#151

Closed
kchilton2 wants to merge 1 commit into
apache:masterfrom
kchilton2:RYA-253
Closed

RYA-253 Converted the rya.prospector class from Groovy to Java. Also added documentation to the project.#151
kchilton2 wants to merge 1 commit into
apache:masterfrom
kchilton2:RYA-253

Conversation

@kchilton2
Copy link
Copy Markdown
Contributor

No description provided.

} catch (AccumuloSecurityException e) {
e.printStackTrace();
} catch (final AccumuloException | AccumuloSecurityException | TableExistsException e) {
LOG.warn("A problem was encountered while setting the Configuration for the EntityOptimizer.", e);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there a way we can make this more informative?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what else you'd say here. The chained exception will have the details.

} catch (AccumuloSecurityException e) {
e.printStackTrace();
} catch (final AccumuloException | AccumuloSecurityException | TableExistsException e) {
LOG.warn("A problem was encountered while constructing the EntityOptimizer.", e);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there a way we can make this more informative?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what else you'd say here. The chained exception will have the details.

import com.google.common.base.Joiner;

public class EntityTupleSet extends ExternalSet implements ExternalBatchingIterator {
/*
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move the license to the top

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

minCard = csp.getCardinality();
minSp = csp.getSp();
} else {
// TODO come up with a better default if cardinality is not
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a 'make jira ticket' todo or can this be removed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea. This comment was already present when I was converting.

}

@Override
public int compareTo(IntermediateProspect t) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this the norm for this kind of comparison? seems odd.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure. This is how it was already working so I'm not changing it.

* The data portion of an {@link IndexEntry} contains a unique Subject that
* appears within a Rya instance's Statements.
*/
subject,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't conventions put enums as all capitalized?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, I'll update the code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just kidding, that breaks things because it uses the enum's value as part of the Row Key in accumulo. I don't want to change the functionality, so I'm leaving it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't you override getValue() to return the lowercase?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no getValue() method on enums. It's using toString() and valueOf(String). I would have to implement new methods on the enum to handle this case. Which I can do if this style is a deal breaker.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally would like the extra functionality to keep to the convention

assert outTable != null;
assert auths_str != null;

final Job job = new Job(getConf(), this.getClass().getSimpleName() + "_" + System.currentTimeMillis());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use NOW?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not changing the behavior of the code, I'm just converting it from Groovy to Java, so I'm going to leave this as is.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then I don't think NOW is ever used

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is used on lines 67 and 85.

void setKey(K key) {
this.key = key
public void setKey(K key) {
this.key = key;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how was this even working without semicolons before.....

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was groovy.

@kchilton2
Copy link
Copy Markdown
Contributor Author

Update to reflect Andrew's comments.

@kchilton2
Copy link
Copy Markdown
Contributor Author

Changing the enums to all makes the unit tests fail because those enum values as strings are used within the storage, so I'm going to back out that change in my next update to this PR.

@isper3at
Copy link
Copy Markdown
Contributor

:shipit:

@kchilton2
Copy link
Copy Markdown
Contributor Author

asfbot build

2 similar comments
@kchilton2
Copy link
Copy Markdown
Contributor Author

asfbot build

@meiercaleb
Copy link
Copy Markdown
Contributor

asfbot build

@asfbot
Copy link
Copy Markdown

asfbot commented Apr 11, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests-on-demand/44/

Build result: FAILURE

[...truncated 6.62 MB...][INFO] Apache Rya Web Projects ............................ SKIPPED[INFO] Apache Rya Web Implementation ...................... SKIPPED[INFO] ------------------------------------------------------------------------[JENKINS] Archiving disabled[INFO] BUILD FAILURE[INFO] ------------------------------------------------------------------------[INFO] Total time: 47:57 min[INFO] Finished at: 2017-04-11T18:08:47+00:00[INFO] Final Memory: 189M/996M[INFO] ------------------------------------------------------------------------Waiting for Jenkins to finish collecting data[ERROR] Failed to execute goal on project rya.geoindexing: Could not resolve dependencies for project org.apache.rya:rya.geoindexing:jar:3.2.11-incubating-SNAPSHOT: The following artifacts could not be resolved: mil.nga.giat:geowave-datastore-accumulo:jar:0.9.3, mil.nga.giat:geowave-adapter-vector:jar:0.9.3: Could not find artifact mil.nga.giat:geowave-datastore-accumulo:jar:0.9.3 in osgeo (http://download.osgeo.org/webdav/geotools/) -> [Help 1][ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.[ERROR] Re-run Maven using the -X switch to enable full debug logging.[ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles:[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException[ERROR] [ERROR] After correcting the problems, you can resume the build with the command[ERROR] mvn -rf :rya.geoindexingchannel stoppedSetting status of a6c904c to FAILURE with url https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests-on-demand/44/ and message: 'Build finished. 'Using context: asfbot build

@kchilton2
Copy link
Copy Markdown
Contributor Author

asfbot build

@asfbot
Copy link
Copy Markdown

asfbot commented Apr 11, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests-on-demand/45/

Build result: FAILURE

[...truncated 5.84 MB...][INFO] Apache Rya Spark Support ........................... SKIPPED[INFO] Apache Rya Web Projects ............................ SKIPPED[INFO] Apache Rya Web Implementation ...................... SKIPPED[INFO] ------------------------------------------------------------------------[INFO] BUILD FAILURE[INFO] ------------------------------------------------------------------------[INFO] Total time: 27:41 min[INFO] Finished at: 2017-04-11T18:39:11+00:00[INFO] Final Memory: 250M/1144M[INFO] ------------------------------------------------------------------------Waiting for Jenkins to finish collecting data[ERROR] Failed to execute goal on project rya.geoindexing: Could not resolve dependencies for project org.apache.rya:rya.geoindexing:jar:3.2.11-incubating-SNAPSHOT: The following artifacts could not be resolved: mil.nga.giat:geowave-datastore-accumulo:jar:0.9.3, mil.nga.giat:geowave-adapter-vector:jar:0.9.3: Failure to find mil.nga.giat:geowave-datastore-accumulo:jar:0.9.3 in http://download.osgeo.org/webdav/geotools/ was cached in the local repository, resolution will not be reattempted until the update interval of osgeo has elapsed or updates are forced -> [Help 1][ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.[ERROR] Re-run Maven using the -X switch to enable full debug logging.[ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles:[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException[ERROR] [ERROR] After correcting the problems, you can resume the build with the command[ERROR] mvn -rf :rya.geoindexingchannel stoppedSetting status of a6c904c to FAILURE with url https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests-on-demand/45/ and message: 'Build finished. 'Using context: asfbot build

@asfbot
Copy link
Copy Markdown

asfbot commented Apr 11, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests-on-demand/46/

Build result: FAILURE

[...truncated 5.83 MB...][INFO] Apache Rya Spark Support ........................... SKIPPED[INFO] Apache Rya Web Projects ............................ SKIPPED[INFO] Apache Rya Web Implementation ...................... SKIPPED[INFO] ------------------------------------------------------------------------[INFO] BUILD FAILURE[INFO] ------------------------------------------------------------------------[INFO] Total time: 28:02 min[INFO] Finished at: 2017-04-11T19:11:33+00:00[INFO] Final Memory: 242M/987M[INFO] ------------------------------------------------------------------------Waiting for Jenkins to finish collecting data[ERROR] Failed to execute goal on project rya.geoindexing: Could not resolve dependencies for project org.apache.rya:rya.geoindexing:jar:3.2.11-incubating-SNAPSHOT: The following artifacts could not be resolved: mil.nga.giat:geowave-datastore-accumulo:jar:0.9.3, mil.nga.giat:geowave-adapter-vector:jar:0.9.3: Failure to find mil.nga.giat:geowave-datastore-accumulo:jar:0.9.3 in http://download.osgeo.org/webdav/geotools/ was cached in the local repository, resolution will not be reattempted until the update interval of osgeo has elapsed or updates are forced -> [Help 1][ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.[ERROR] Re-run Maven using the -X switch to enable full debug logging.[ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles:[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException[ERROR] [ERROR] After correcting the problems, you can resume the build with the command[ERROR] mvn -rf :rya.geoindexingchannel stoppedSetting status of a6c904c to FAILURE with url https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests-on-demand/46/ and message: 'Build finished. 'Using context: asfbot build

@amihalik
Copy link
Copy Markdown
Contributor

asfbot build

@asfbot
Copy link
Copy Markdown

asfbot commented Apr 12, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests-on-demand/47/

Build result: ABORTED

[...truncated 14.96 MB...][INFO] Downloading: https://repo.locationtech.org/content/repositories/releases/org/eclipse/jetty/jetty-server/9.1.5.v20140505/jetty-server-9.1.5.v20140505.jar[INFO] Downloading: https://repo.locationtech.org/content/repositories/releases/org/eclipse/jetty/jetty-servlet/9.1.5.v20140505/jetty-servlet-9.1.5.v20140505.jar[INFO] Downloading: https://repo.locationtech.org/content/repositories/releases/org/apache/accumulo/accumulo-shell/1.7.2/accumulo-shell-1.7.2.jar[INFO] Downloading: https://repo.locationtech.org/content/repositories/releases/org/apache/accumulo/accumulo-tracer/1.7.2/accumulo-tracer-1.7.2.jar[INFO] Downloading: https://repo.locationtech.org/content/repositories/thirdparty/org/eclipse/jetty/jetty-server/9.1.5.v20140505/jetty-server-9.1.5.v20140505.jar[INFO] Downloading: https://repo.locationtech.org/content/repositories/thirdparty/org/eclipse/jetty/jetty-servlet/9.1.5.v20140505/jetty-servlet-9.1.5.v20140505.jar[INFO] Downloading: https://repo.locationtech.org/content/repositories/thirdparty/org/apache/accumulo/accumulo-shell/1.7.2/accumulo-shell-1.7.2.jar[INFO] Downloading: https://repo.locationtech.org/content/repositories/thirdparty/org/apache/accumulo/accumulo-tracer/1.7.2/accumulo-tracer-1.7.2.jar[INFO] Downloading: https://s3.amazonaws.com/geowave-maven/release/org/eclipse/jetty/jetty-server/9.1.5.v20140505/jetty-server-9.1.5.v20140505.jar[INFO] Downloading: https://s3.amazonaws.com/geowave-maven/release/org/eclipse/jetty/jetty-servlet/9.1.5.v20140505/jetty-servlet-9.1.5.v20140505.jar[INFO] Downloading: https://s3.amazonaws.com/geowave-maven/release/org/apache/accumulo/accumulo-shell/1.7.2/accumulo-shell-1.7.2.jar[INFO] Downloading: https://s3.amazonaws.com/geowave-maven/release/org/apache/accumulo/accumulo-tracer/1.7.2/accumulo-tracer-1.7.2.jar[INFO] Downloading: https://repo.maven.apache.org/maven2/org/eclipse/jetty/jetty-server/9.1.5.v20140505/jetty-server-9.1.5.v20140505.jar[INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/accumulo/accumulo-shell/1.7.2/accumulo-shell-1.7.2.jar[INFO] Downloading: https://repo.maven.apache.org/maven2/org/eclipse/jetty/jetty-servlet/9.1.5.v20140505/jetty-servlet-9.1.5.v20140505.jar[INFO] Downloaded: https://repo.maven.apache.org/maven2/org/eclipse/jetty/jetty-server/9.1.5.v20140505/jetty-server-9.1.5.v20140505.jar (393 KB at 8715.1 KB/sec)[INFO] Downloaded: https://repo.maven.apache.org/maven2/org/eclipse/jetty/jetty-servlet/9.1.5.v20140505/jetty-servlet-9.1.5.v20140505.jar (109 KB at 5419.5 KB/sec)[INFO] Downloaded: https://repo.maven.apache.org/maven2/org/apache/accumulo/accumulo-shell/1.7.2/accumulo-shell-1.7.2.jar (258 KB at 7355.6 KB/sec)[INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/accumulo/accumulo-tracer/1.7.2/accumulo-tracer-1.7.2.jar[INFO] Downloaded: https://repo.maven.apache.org/maven2/org/apache/accumulo/accumulo-tracer/1.7.2/accumulo-tracer-1.7.2.jar (137 KB at 1111.1 KB/sec)Build was abortedchannel stoppedSetting status of a6c904c to FAILURE with url https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests-on-demand/47/ and message: 'Build finished. 'Using context: asfbot build

@asfgit asfgit closed this in bd9b912 Apr 13, 2017
@kchilton2 kchilton2 deleted the RYA-253 branch April 14, 2017 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants