accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [accumulo] branch master updated: Fix SslIT integration tests (#895)
Date Fri, 11 Jan 2019 22:06:14 GMT
This is an automated email from the ASF dual-hosted git repository.

ctubbsii pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/master by this push:
     new 729524c  Fix SslIT integration tests (#895)
729524c is described below

commit 729524c201f4472d38d452c42f2d91a281e531b3
Author: Christopher Tubbs <ctubbsii@apache.org>
AuthorDate: Fri Jan 11 17:06:10 2019 -0500

    Fix SslIT integration tests (#895)
    
    Ensure ssl parameters are properly passed from the Ssl IT to the
    mapreduce client process running with ssl.
---
 .../java/org/apache/accumulo/test/mapreduce/MapReduceIT.java   | 10 +++++++++-
 .../main/java/org/apache/accumulo/test/mapreduce/RowHash.java  |  8 ++++++--
 test/src/main/resources/log4j.properties                       |  2 ++
 3 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/test/src/main/java/org/apache/accumulo/test/mapreduce/MapReduceIT.java b/test/src/main/java/org/apache/accumulo/test/mapreduce/MapReduceIT.java
index 33b13c2..8f8ff44 100644
--- a/test/src/main/java/org/apache/accumulo/test/mapreduce/MapReduceIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/mapreduce/MapReduceIT.java
@@ -18,7 +18,10 @@ package org.apache.accumulo.test.mapreduce;
 
 import static org.junit.Assert.assertEquals;
 
+import java.io.File;
 import java.io.IOException;
+import java.io.PrintStream;
+import java.nio.file.Paths;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
 import java.util.Base64;
@@ -87,10 +90,15 @@ public class MapReduceIT extends ConfigurableMacBase {
       bw.addMutation(m);
     }
     bw.close();
+    String filename = MapReduceIT.class.getName() + "-client.properties";
+    File configFile = Paths.get(System.getProperty("user.dir"), "target", filename).toFile();
+    try (PrintStream out = new PrintStream(configFile)) {
+      c.properties().store(out, "Config file for " + MapReduceIT.class.getName());
+    }
     ClientInfo info = ClientInfo.from(c.properties());
     Process hash = cluster.exec(RowHash.class, Collections.singletonList(hadoopTmpDirArg),
"-i",
         info.getInstanceName(), "-z", info.getZooKeepers(), "-u", "root", "-p", ROOT_PASSWORD,
"-t",
-        tablename, "--column", input_cfcq);
+        tablename, "--column", input_cfcq, "--config-file", configFile.getAbsolutePath());
     assertEquals(0, hash.waitFor());
 
     try (Scanner s = c.createScanner(tablename, Authorizations.EMPTY)) {
diff --git a/test/src/main/java/org/apache/accumulo/test/mapreduce/RowHash.java b/test/src/main/java/org/apache/accumulo/test/mapreduce/RowHash.java
index ea0b146..6282f7a 100644
--- a/test/src/main/java/org/apache/accumulo/test/mapreduce/RowHash.java
+++ b/test/src/main/java/org/apache/accumulo/test/mapreduce/RowHash.java
@@ -27,6 +27,7 @@ import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.admin.DelegationTokenConfig;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.client.security.tokens.KerberosToken;
+import org.apache.accumulo.core.clientImpl.ClientConfConverter;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
@@ -82,10 +83,13 @@ public class RowHash extends Configured implements Tool {
     }
 
     public void setAccumuloConfigs(Job job) throws AccumuloSecurityException {
+      org.apache.accumulo.core.client.ClientConfiguration clientConf = ClientConfConverter
+          .toClientConf(this.getClientProperties());
       org.apache.accumulo.core.client.mapreduce.AccumuloInputFormat.setZooKeeperInstance(job,
-          this.instance, this.zookeepers);
+          clientConf);
+
       org.apache.accumulo.core.client.mapreduce.AccumuloOutputFormat.setZooKeeperInstance(job,
-          this.instance, this.zookeepers);
+          clientConf);
 
       final String principal = getPrincipal();
       getTableName();
diff --git a/test/src/main/resources/log4j.properties b/test/src/main/resources/log4j.properties
index 0ba2ff9..e50fd35 100644
--- a/test/src/main/resources/log4j.properties
+++ b/test/src/main/resources/log4j.properties
@@ -55,3 +55,5 @@ log4j.logger.org.apache.accumulo.server.thrift.UGIAssumingProcessor=TRACE
 log4j.logger.org.apache.hadoop.security.UserGroupInformation=INFO
 # For debugging replication tests.
 log4j.logger.org.apache.accumulo.master.MasterDrainImpl=TRACE
+# This is spammy
+log4j.logger.org.apache.accumulo.miniclusterImpl.MiniAccumuloClusterImpl=INFO


Mime
View raw message