accumulo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Medinets <>
Subject Programmatically Gettting a TServer address for ThriftUtil.getClient?
Date Thu, 31 Jan 2013 14:48:43 GMT
I have some code that totals the number of entries in each tablet will
the end goal of find the average number of entries per tablet;
basically for a hotspot report. My code is working on my single-node
Accumulo but not on the edge node of my Accumulo cluster. On my edge
node, the TServer list has zero entries.

  1) Any idea why the multi-node cluster is not reporting the set of TServers?
  2) Is there a different, better, recommended, way to accomplish my goal?

  LiveTServerSet tserverSet = new LiveTServerSet(instance, new
  Set<TServerInstance> tserverList = tserverSet.getCurrentServers();
  if (tserverList.size() == 0) {
    throw new RuntimeException("NO TSERVERS!");
  TServerInstance tServerInstance (TServerInstance) tserverList.toArray()[0];
  InetSocketAddress tserverAddress =
AddressUtil.parseAddress( + ":" +
tServerInstance.port(), -1);

  List<TabletStats> tsStats = new ArrayList<TabletStats>();

  TableClientService.Iface client = ThrifUtil.getClient(new
TabletClientService.Client.Factory(), tserverAddress,
  for (String tableId : mmi.tableMap.keySet()) {
SecurityConstants.getSystemCredentials(), tableId));

  long totalEntries = 0;
  long tabletCount = 0;
  for (TableStats info : tsStats) {
    totalEntries += info.numEntries;

View raw message