This is an automated email from the ASF dual-hosted git repository.
kturner pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo-testing.git
The following commit(s) were added to refs/heads/master by this push:
new bdf2ab3 Stopped using non public API ClientContext
bdf2ab3 is described below
commit bdf2ab3aa7a5a680df306ef29fa72dc4eb4d786a
Author: Keith Turner <[email protected]>
AuthorDate: Wed Jan 30 12:31:07 2019 -0500
Stopped using non public API ClientContext
Needed to do this inorder to build against 2.0.0-alpha-2
---
contrib/import-control.xml | 1 -
.../apache/accumulo/testing/ingest/TestIngest.java | 22 ++++++++++------------
2 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/contrib/import-control.xml b/contrib/import-control.xml
index ff2be61..ce449fc 100644
--- a/contrib/import-control.xml
+++ b/contrib/import-control.xml
@@ -40,7 +40,6 @@
<allow class="org.apache.accumulo.core.spi.scan.HintScanPrioritizer"/>
<allow
class="org.apache.accumulo.hadoopImpl.mapreduce.lib.MapReduceClientOnRequiredTable"/>
<allow class="org.apache.accumulo.core.crypto.CryptoServiceFactory"/>
- <allow class="org.apache.accumulo.core.clientImpl.ClientContext"/>
<allow
class="org.apache.accumulo.core.clientImpl.TabletServerBatchWriter"/>
<allow class="org.apache.accumulo.core.file.FileOperations"/>
<allow class="org.apache.accumulo.core.file.FileSKVWriter"/>
diff --git a/src/main/java/org/apache/accumulo/testing/ingest/TestIngest.java
b/src/main/java/org/apache/accumulo/testing/ingest/TestIngest.java
index de3ccb4..a54bb44 100644
--- a/src/main/java/org/apache/accumulo/testing/ingest/TestIngest.java
+++ b/src/main/java/org/apache/accumulo/testing/ingest/TestIngest.java
@@ -34,7 +34,6 @@ import
org.apache.accumulo.core.client.MutationsRejectedException;
import org.apache.accumulo.core.client.TableExistsException;
import org.apache.accumulo.core.client.TableNotFoundException;
import org.apache.accumulo.core.client.security.SecurityErrorCode;
-import org.apache.accumulo.core.clientImpl.ClientContext;
import org.apache.accumulo.core.clientImpl.TabletServerBatchWriter;
import org.apache.accumulo.core.conf.DefaultConfiguration;
import org.apache.accumulo.core.crypto.CryptoServiceFactory;
@@ -199,7 +198,7 @@ public class TestIngest {
// test batch update
- ingest(client, opts, bwOpts);
+ ingest(client, opts, bwOpts, new Configuration());
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
@@ -208,9 +207,10 @@ public class TestIngest {
}
}
- public static void ingest(AccumuloClient client, FileSystem fs, Opts opts,
BatchWriterOpts bwOpts)
- throws IOException, AccumuloException, AccumuloSecurityException,
TableNotFoundException,
- MutationsRejectedException, TableExistsException {
+ public static void ingest(AccumuloClient client, FileSystem fs, Opts opts,
+ BatchWriterOpts bwOpts, Configuration conf) throws IOException,
AccumuloException,
+ AccumuloSecurityException, TableNotFoundException,
MutationsRejectedException,
+ TableExistsException {
long stopTime;
byte[][] bytevals = generateValues(opts.dataSize);
@@ -226,11 +226,10 @@ public class TestIngest {
FileSKVWriter writer = null;
if (opts.outputFile != null) {
- ClientContext cc = (ClientContext) client;
writer = FileOperations
.getInstance()
.newWriterBuilder()
- .forFile(opts.outputFile + "." + RFile.EXTENSION, fs,
cc.getHadoopConf(),
+ .forFile(opts.outputFile + "." + RFile.EXTENSION, fs, conf,
CryptoServiceFactory.newDefaultInstance())
.withTableConfiguration(DefaultConfiguration.getInstance()).build();
writer.startDefaultLocalityGroup();
@@ -356,10 +355,9 @@ public class TestIngest {
(int) (bytesWritten / elapsed), elapsed);
}
- public static void ingest(AccumuloClient c, Opts opts, BatchWriterOpts
batchWriterOpts)
- throws MutationsRejectedException, IOException, AccumuloException,
AccumuloSecurityException,
- TableNotFoundException, TableExistsException {
- ClientContext cc = (ClientContext) c;
- ingest(c, FileSystem.get(cc.getHadoopConf()), opts, batchWriterOpts);
+ public static void ingest(AccumuloClient c, Opts opts, BatchWriterOpts
batchWriterOpts,
+ Configuration conf) throws MutationsRejectedException, IOException,
AccumuloException,
+ AccumuloSecurityException, TableNotFoundException, TableExistsException {
+ ingest(c, FileSystem.get(conf), opts, batchWriterOpts, conf);
}
}