Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Accumulo >> mail # dev >> TableLoadBalancer.getTableOperations get instance from HdfsZooInstance ... can it use configuration.getInstance() instead .. to promote unit testing?


Copy link to this message
-
TableLoadBalancer.getTableOperations get instance from HdfsZooInstance ... can it use configuration.getInstance() instead .. to promote unit testing?
In trunk, the abstract TabletBalancer class has a configuration class variable:

  protected ServerConfiguration configuration;

The TableLoadBalancer class has a getTableOperations method that get
an instance value from HdfsZooInstance:

  protected TableOperations getTableOperations() {
    if (tops == null)
      try {
        tops = HdfsZooInstance.getInstance().getConnector(SecurityConstants.getSystemCredentials()).tableOperations();
      } catch (AccumuloException e) {
        log.error("Unable to access table operations from within table
balancer", e);
      } catch (AccumuloSecurityException e) {
        log.error("Unable to access table operations from within table
balancer", e);
      }
    return tops;
  }

Is there any reason why the TableLoadBalancer can't use its
configuration variable to find the accumulo instance?
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB