You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2018/10/25 16:54:18 UTC
[GitHub] mikewalch commented on a change in pull request #718: Made
AccumuloClient Closeable
mikewalch commented on a change in pull request #718: Made AccumuloClient Closeable
URL: https://github.com/apache/accumulo/pull/718#discussion_r228252965
##########
File path: test/src/main/java/org/apache/accumulo/test/functional/ReadWriteIT.java
##########
@@ -139,70 +139,71 @@ public void sunnyDay() throws Exception {
// Shutdown cleanly.
log.debug("Starting Monitor");
cluster.getClusterControl().startAllServers(ServerType.MONITOR);
- AccumuloClient accumuloClient = getAccumuloClient();
- String tableName = getUniqueNames(1)[0];
- ingest(accumuloClient, getClientInfo(), ROWS, COLS, 50, 0, tableName);
- verify(accumuloClient, getClientInfo(), ROWS, COLS, 50, 0, tableName);
- String monitorLocation = null;
- while (null == monitorLocation) {
- monitorLocation = MonitorUtil.getLocation(getClientContext());
- if (null == monitorLocation) {
- log.debug("Could not fetch monitor HTTP address from zookeeper");
- Thread.sleep(2000);
+ try (AccumuloClient accumuloClient = getAccumuloClient()) {
+ String tableName = getUniqueNames(1)[0];
+ ingest(accumuloClient, getClientInfo(), ROWS, COLS, 50, 0, tableName);
+ verify(accumuloClient, getClientInfo(), ROWS, COLS, 50, 0, tableName);
+ String monitorLocation = null;
+ while (null == monitorLocation) {
+ monitorLocation = MonitorUtil.getLocation(getClientContext());
+ if (null == monitorLocation) {
+ log.debug("Could not fetch monitor HTTP address from zookeeper");
+ Thread.sleep(2000);
+ }
}
- }
- String scheme = "http://";
- if (getCluster() instanceof StandaloneAccumuloCluster) {
- StandaloneAccumuloCluster standaloneCluster = (StandaloneAccumuloCluster) getCluster();
- File accumuloProps = new File(standaloneCluster.getServerAccumuloConfDir(),
- "accumulo.properties");
- if (accumuloProps.isFile()) {
- Configuration conf = new Configuration(false);
- conf.addResource(new Path(accumuloProps.toURI()));
- String monitorSslKeystore = conf.get(Property.MONITOR_SSL_KEYSTORE.getKey());
- if (null != monitorSslKeystore) {
- log.info(
- "Setting scheme to HTTPS since monitor ssl keystore configuration was observed in {}",
+ String scheme = "http://";
+ if (getCluster() instanceof StandaloneAccumuloCluster) {
+ StandaloneAccumuloCluster standaloneCluster = (StandaloneAccumuloCluster) getCluster();
+ File accumuloProps = new File(standaloneCluster.getServerAccumuloConfDir(),
+ "accumulo.properties");
+ if (accumuloProps.isFile()) {
+ Configuration conf = new Configuration(false);
+ conf.addResource(new Path(accumuloProps.toURI()));
+ String monitorSslKeystore = conf.get(Property.MONITOR_SSL_KEYSTORE.getKey());
+ if (null != monitorSslKeystore) {
+ log.info(
+ "Setting scheme to HTTPS since monitor ssl keystore configuration was observed in {}",
Review comment:
This line needs to be under 100 chars
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services