You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@rya.apache.org by jdasch <gi...@git.apache.org> on 2017/08/14 19:28:42 UTC

[GitHub] incubator-rya pull request #205: RYA-343 Fixed rya.api connection issue for ...

GitHub user jdasch opened a pull request:

    https://github.com/apache/incubator-rya/pull/205

    RYA-343 Fixed rya.api connection issue for PCJ-enabled rya table.

    <!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at
    
      http://www.apache.org/licenses/LICENSE-2.0
    
    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
    -->
    ## Description
    Added a couple configs that weren't getting set and caused a regression.
    
    Purpose of this PR is to get a fix in place now.  We should probably make a new JIRA to ensure this regression is captured by an IT and to expand PCJDetails to store/retrieve this information.
    
    ### Tests
    None.
    
    ### Links
    [Jira: RYA-343](https://issues.apache.org/jira/browse/RYA-343)
    
    ### Checklist
    - [ ] Code Review
    - [ ] Squash Commits
    
    #### People To Reivew
    @amihalik 
    @meiercaleb 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jdasch/incubator-rya RYA-343

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-rya/pull/205.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #205
    
----
commit 81477c5815f3f54a3ccd5d32e87e6692461b32a9
Author: jdasch <jd...@localhost.localdomain>
Date:   2017-08-14T19:21:10Z

    RYA-343 Fixed rya.api connection issue for PCJ-enabled rya table.

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-rya pull request #205: RYA-343 Fixed rya.api connection issue for ...

Posted by jdasch <gi...@git.apache.org>.
Github user jdasch commented on a diff in the pull request:

    https://github.com/apache/incubator-rya/pull/205#discussion_r133458983
  
    --- 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");
    +        } else {
    +            checkAndSet(conf, ConfigurationFields.USE_PCJ_UPDATER, false);
    +            conf.set(ConfigurationFields.PCJ_UPDATER_TYPE, "NO_UPDATE");
    --- End diff --
    
    I completely agree with you on not using the String literals.  Unfortunately `PrecomputedJoinUpdaterType` is in rya.indexing and `RyaDetailsToConfiguration` is in rya.api, so I can't access that type.  I believe (could be wrong) that Caleb had the action item to create (or reference) a JIRA that would enhance the `PCJIndexDetails` class to have a `PCJIndexDetails.getUpdaterType()` and `PCJIndexDetails.getStorageType()` methods, or perhaps we might go in some other direction with the implementation.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-rya pull request #205: RYA-343 Fixed rya.api connection issue for ...

Posted by ejwhite922 <gi...@git.apache.org>.
Github user ejwhite922 commented on a diff in the pull request:

    https://github.com/apache/incubator-rya/pull/205#discussion_r133455098
  
    --- 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");
    +        } else {
    +            checkAndSet(conf, ConfigurationFields.USE_PCJ_UPDATER, false);
    +            conf.set(ConfigurationFields.PCJ_UPDATER_TYPE, "NO_UPDATE");
    --- End diff --
    
    I realize it was already like this but make use of the PrecomputedJoinUpdaterType and PrecomputedJoinStorageType enums in this method instead of hard-coded strings.
    Replace:
    "NO_UPDATE" with PrecomputedJoinUpdaterType.NO_UPDATE.toString(),
    "FLUO" with PrecomputedJoinUpdaterType.FLUO.toString(), and
    "ACCUMULO" with PrecomputedJoinStorageType.ACCUMULO.toString()


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-rya pull request #205: RYA-343 Fixed rya.api connection issue for ...

Posted by meiercaleb <gi...@git.apache.org>.
Github user meiercaleb commented on a diff in the pull request:

    https://github.com/apache/incubator-rya/pull/205#discussion_r133485762
  
    --- 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");
    +        } else {
    +            checkAndSet(conf, ConfigurationFields.USE_PCJ_UPDATER, false);
    +            conf.set(ConfigurationFields.PCJ_UPDATER_TYPE, "NO_UPDATE");
    --- End diff --
    
    This issue has been created https://issues.apache.org/jira/browse/RYA-344.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-rya pull request #205: RYA-343 Fixed rya.api connection issue for ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-rya/pull/205


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-rya pull request #205: RYA-343 Fixed rya.api connection issue for ...

Posted by meiercaleb <gi...@git.apache.org>.
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.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-rya issue #205: RYA-343 Fixed rya.api connection issue for PCJ-ena...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit commented on the issue:

    https://github.com/apache/incubator-rya/pull/205
  
    
    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/388/



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---