@Override public void traceOn(String description, Map<String, String> data) { if (!distributedTraceEnabled) { try { ClientConfiguration conf = getConfiguration().getClientConfiguration(); DistributedTrace.enable(null, AccumuloGraph.class.getSimpleName(), conf); distributedTraceEnabled = true; } catch (Exception e) { throw new VertexiumException("Could not enable DistributedTrace", e); } } if (Trace.isTracing()) { throw new VertexiumException("Trace already running"); } Span span = Trace.on(description); for (Map.Entry<String, String> dataEntry : data.entrySet()) { span.data(dataEntry.getKey(), dataEntry.getValue()); } LOGGER.info("Started trace '%s'", description); }
@Override public void traceOn(String description, Map<String, String> data) { if (!distributedTraceEnabled) { try { ClientConfiguration conf = getConfiguration().getClientConfiguration(); DistributedTrace.enable(null, AccumuloGraph.class.getSimpleName(), conf); distributedTraceEnabled = true; } catch (Exception e) { throw new VertexiumException("Could not enable DistributedTrace", e); } } if (Trace.isTracing()) { throw new VertexiumException("Trace already running"); } Span span = Trace.on(description); for (Map.Entry<String, String> dataEntry : data.entrySet()) { span.data(dataEntry.getKey(), dataEntry.getValue()); } LOGGER.info("Started trace '%s'", description); }
public Connector createConnector() { try { LOGGER.info("Connecting to accumulo instance [%s] zookeeper servers [%s]", this.getAccumuloInstanceName(), this.getZookeeperServers()); ZooKeeperInstance instance = new ZooKeeperInstance(getClientConfiguration()); return instance.getConnector(this.getAccumuloUsername(), this.getAuthenticationToken()); } catch (Exception ex) { throw new VertexiumException( String.format("Could not connect to Accumulo instance [%s] zookeeper servers [%s]", this.getAccumuloInstanceName(), this.getZookeeperServers()), ex ); } }
public Connector createConnector() { try { LOGGER.info("Connecting to accumulo instance [%s] zookeeper servers [%s]", this.getAccumuloInstanceName(), this.getZookeeperServers()); ZooKeeperInstance instance = new ZooKeeperInstance(getClientConfiguration()); return instance.getConnector(this.getAccumuloUsername(), this.getAuthenticationToken()); } catch (Exception ex) { throw new VertexiumException( String.format("Could not connect to Accumulo instance [%s] zookeeper servers [%s]", this.getAccumuloInstanceName(), this.getZookeeperServers()), ex ); } }