Accumulo
  1. Accumulo
  2. ACCUMULO-240

client code for TableConfiguration has problems

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.5
    • Fix Version/s: 1.4.2
    • Component/s: client
    • Labels:
      None

      Description

      There are a number of problems with accessing TableConfiguration object from client code, the first being that TableOperationImpl uses code that relies on a hidden HDFSZooInstance in client configuration. If the client is not running with access to the HDFS Accumulo directory, or if the HDFS setup on the client differs from the Accumulo instance, then this call will fail:

      Exception in thread "main" java.lang.ExceptionInInitializerError
      Caused by: org.apache.accumulo.core.client.impl.HdfsZooInstance$AccumuloNotInitializedException: Accumulo not initialized, there is no instance id at /accumulo/instance_id
      	at org.apache.accumulo.core.client.impl.HdfsZooInstance._getInstanceID(HdfsZooInstance.java:136)
      	at org.apache.accumulo.core.client.impl.HdfsZooInstance.getInstanceID(HdfsZooInstance.java:123)
      	at org.apache.accumulo.core.conf.ZooConfiguration.getInstanceId(ZooConfiguration.java:65)
      	at org.apache.accumulo.core.conf.ZooConfiguration.iterator(ZooConfiguration.java:132)
      	at org.apache.accumulo.core.conf.TableConfiguration.iterator(TableConfiguration.java:129)
      	at org.apache.accumulo.core.conf.ConfigSanityCheck.validate(ConfigSanityCheck.java:29)
      	at org.apache.accumulo.core.conf.AccumuloConfiguration.getTableConfiguration(AccumuloConfiguration.java:150)
      	at org.apache.accumulo.core.client.admin.TableOperationsImpl.getProperties(TableOperationsImpl.java:544)
      	at org.apache.accumulo.core.client.admin.TableOperationsImpl.setLocalityGroups(TableOperationsImpl.java:583)
      

      Another problem is that the ZooConfiguration object uses static instance information, negating the possibility of using multiple instances in the same JVM.

        Issue Links

          Activity

          Hide
          Jared Winick added a comment -

          I believe this bug describes the same issue as ACCUMULO-225, but in a more general way. If you agree, feel free to close ACCUMULO-225.

          Show
          Jared Winick added a comment - I believe this bug describes the same issue as ACCUMULO-225 , but in a more general way. If you agree, feel free to close ACCUMULO-225 .

            People

            • Assignee:
              Adam Fuchs
              Reporter:
              Adam Fuchs
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development