Github user meiercaleb commented on a diff in the pull request:
https://github.com/apache/incubator-rya/pull/213#discussion_r134797365
--- Diff:
common/rya.api/src/main/java/org/apache/rya/api/client/CreatePCJ.java ---
@@ -27,8 +29,28 @@
@DefaultAnnotation(NonNull.class)
public interface CreatePCJ {
+ public static enum QueryType{Construct, Projection, Periodic};
+ public static enum ExportStrategy{Rya, Kafka, NoOpExport};
+
+
+ /**
+ * Designate a new PCJ that will be maintained by the target instance
of Rya.
+ * Results will be exported according to the specified export
strategies.
+ *
+ * @param instanceName - Indicates which Rya instance will create and
maintain
+ * the PCJ. (not null)
+ * @param sparql - The SPARQL query that will be maintained. (not null)
+ * @param strategies - The export strategies used to export results
for this query
+ * @return The ID that was assigned to this newly created PCJ.
+ * @throws InstanceDoesNotExistException No instance of Rya exists for
the provided name.
+ * @throws RyaClientException Something caused the command to fail.
+ */
+ public String createPCJ(final String instanceName, String sparql,
Set<ExportStrategy> strategies) throws InstanceDoesNotExistException,
RyaClientException;
--- End diff --
Yes. That was primarily the purpose of this PR. To allow the user to
specify an ExportStrategy on a query by query basis. Previously, the FluoApp
exported using all Exporters that were available, which meant it exported to a
RYA PCJ and to Kafka. There are certain queries where only one type of
Exporter is available -- for queries with Aggregations, you can only export to
Kafka -- this is a by product of how results are written to the Accumulo table.
This is something that should be fixed going forward.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---