[ https://issues.apache.org/jira/browse/RYA-343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16126702#comment-16126702 ]
ASF GitHub Bot commented on RYA-343: ------------------------------------ Github user meiercaleb commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/205#discussion_r133100980 --- Diff: common/rya.api/src/main/java/org/apache/rya/api/instance/RyaDetailsToConfiguration.java --- @@ -53,14 +53,16 @@ public static void addRyaDetailsToConfiguration(final RyaDetails details, final checkAndSet(conf, ConfigurationFields.USE_FREETEXT, details.getFreeTextIndexDetails().isEnabled()); //RYA-215 checkAndSet(conf, ConfigurationFields.USE_GEO, details.getGeoIndexDetails().isEnabled()); checkAndSet(conf, ConfigurationFields.USE_TEMPORAL, details.getTemporalIndexDetails().isEnabled()); - PCJIndexDetails pcjDetails = details.getPCJIndexDetails(); - if (pcjDetails.isEnabled() && pcjDetails.getFluoDetails().isPresent()) { - checkAndSet(conf, ConfigurationFields.USE_PCJ_UPDATER, true); - conf.set(ConfigurationFields.FLUO_APP_NAME, pcjDetails.getFluoDetails().get().getUpdateAppName()); - conf.set(ConfigurationFields.PCJ_UPDATER_TYPE, "FLUO"); - } else { - checkAndSet(conf, ConfigurationFields.USE_PCJ_UPDATER, false); - } + final PCJIndexDetails pcjDetails = details.getPCJIndexDetails(); + if (pcjDetails.isEnabled() && pcjDetails.getFluoDetails().isPresent()) { + checkAndSet(conf, ConfigurationFields.USE_PCJ_UPDATER, true); + conf.set(ConfigurationFields.FLUO_APP_NAME, pcjDetails.getFluoDetails().get().getUpdateAppName()); + conf.set(ConfigurationFields.PCJ_UPDATER_TYPE, "FLUO"); + conf.set(ConfigurationFields.PCJ_STORAGE_TYPE, "ACCUMULO"); --- End diff -- So this is probably okay for now. But this method could take in either an instance of AccumuloRyaInstanceDetails or an instance of MongoRyaInstanceDetails. So the storage type could be Accumulo or Mongo (note that the Mongo storage type doesn't currently exist in master, but will be merged in as part of a pull request). Given that there is currently no updater for mongo, there will be no fluo details so the the Accumulo storage type will never be set for a Mongo backed instance. But this could change once an updater is implemented for Mongo. The best thing to do is to add a getStorageType() method to the RyaInstanceDetails, and then just pass this into the config so that the storage type aligns with the RyaInstanceDetails type. > AccumuloLoadStatementsFile fails when loading data to a PCJ-enabled table. > -------------------------------------------------------------------------- > > Key: RYA-343 > URL: https://issues.apache.org/jira/browse/RYA-343 > Project: Rya > Issue Type: Sub-task > Components: clients > Reporter: Jeff Dasch > Assignee: Jeff Dasch > > Issue occurs when calling {{AccumuloLoadStatementsFile.loadStatements()}} to > loading data to a PCJ-enabled table. I believe this is a recent regression. > {noformat} > 2017-08-14 13:46:51,802 [Spring Shell] WARN > org.apache.rya.api.client.accumulo.AccumuloLoadStatementsFile - Exception > while loading: > org.apache.rya.api.persist.RyaDAOException: > java.lang.IllegalArgumentException: The 'rya.indexing.pcj.storageType' > property must have one of the following values: [ACCUMULO] > at org.apache.rya.accumulo.AccumuloRyaDAO.init(AccumuloRyaDAO.java:165) > at > org.apache.rya.sail.config.RyaSailFactory.getAccumuloDAO(RyaSailFactory.java:155) > at > org.apache.rya.sail.config.RyaSailFactory.getRyaSail(RyaSailFactory.java:100) > at > org.apache.rya.sail.config.RyaSailFactory.getInstance(RyaSailFactory.java:67) > at > org.apache.rya.api.client.accumulo.AccumuloLoadStatementsFile.loadStatements(AccumuloLoadStatementsFile.java:91) > at org.apache.rya.shell.RyaCommands.loadData(RyaCommands.java:121) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:210) > at > org.springframework.shell.core.SimpleExecutionStrategy.invoke(SimpleExecutionStrategy.java:64) > at > org.springframework.shell.core.SimpleExecutionStrategy.execute(SimpleExecutionStrategy.java:57) > at > org.springframework.shell.core.AbstractShell.executeCommand(AbstractShell.java:127) > at > org.springframework.shell.core.JLineShell.promptLoop(JLineShell.java:533) > at org.springframework.shell.core.JLineShell.run(JLineShell.java:179) > at java.lang.Thread.run(Thread.java:748) > Caused by: java.lang.IllegalArgumentException: The > 'rya.indexing.pcj.storageType' property must have one of the following > values: [ACCUMULO] > at > com.google.common.base.Preconditions.checkArgument(Preconditions.java:92) > at > org.apache.rya.indexing.external.PrecomputedJoinStorageSupplier.get(PrecomputedJoinStorageSupplier.java:68) > at > org.apache.rya.indexing.external.PrecomputedJoinIndexer.init(PrecomputedJoinIndexer.java:139) > at org.apache.rya.accumulo.AccumuloRyaDAO.init(AccumuloRyaDAO.java:156) > ... 16 more > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)