accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject [accumulo-testing] branch master updated: Factor RFile and CryptoServiceFactory from Import-Control (#60)
Date Wed, 27 Feb 2019 17:22:04 GMT
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 33c0f38  Factor RFile and CryptoServiceFactory from Import-Control (#60)
33c0f38 is described below

commit 33c0f38c51dd57573c181779f76aaeac99bd6ae3
Author: Jeffrey Manno <jeffreymanno15@gmail.com>
AuthorDate: Wed Feb 27 12:21:59 2019 -0500

    Factor RFile and CryptoServiceFactory from Import-Control (#60)
---
 contrib/import-control.xml                              |  4 ----
 .../org/apache/accumulo/testing/ingest/TestIngest.java  | 17 +++++------------
 2 files changed, 5 insertions(+), 16 deletions(-)

diff --git a/contrib/import-control.xml b/contrib/import-control.xml
index af247c4..b033e9c 100644
--- a/contrib/import-control.xml
+++ b/contrib/import-control.xml
@@ -43,11 +43,7 @@
     <allow class="org.apache.accumulo.core.replication.ReplicationTable"/>
     <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.TabletServerBatchWriter"/>
-    <allow class="org.apache.accumulo.core.file.FileOperations"/>
-    <allow class="org.apache.accumulo.core.file.FileSKVWriter"/>
-    <allow class="org.apache.accumulo.core.file.rfile.RFile"/>
     <allow class="org.apache.accumulo.core.util.SimpleThreadPool"/>
     <allow class="org.apache.accumulo.core.util.FastFormat"/>
     <allow class="org.apache.accumulo.core.cli.ClientOnRequiredTable"/>
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 a54bb44..4f837be 100644
--- a/src/main/java/org/apache/accumulo/testing/ingest/TestIngest.java
+++ b/src/main/java/org/apache/accumulo/testing/ingest/TestIngest.java
@@ -34,17 +34,14 @@ 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.client.rfile.RFile;
+import org.apache.accumulo.core.client.rfile.RFileWriter;
 import org.apache.accumulo.core.clientImpl.TabletServerBatchWriter;
-import org.apache.accumulo.core.conf.DefaultConfiguration;
-import org.apache.accumulo.core.crypto.CryptoServiceFactory;
 import org.apache.accumulo.core.data.ConstraintViolationSummary;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.TabletId;
 import org.apache.accumulo.core.data.Value;
-import org.apache.accumulo.core.file.FileOperations;
-import org.apache.accumulo.core.file.FileSKVWriter;
-import org.apache.accumulo.core.file.rfile.RFile;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.ColumnVisibility;
 import org.apache.accumulo.core.trace.DistributedTrace;
@@ -223,16 +220,12 @@ public class TestIngest {
     createTable(client, opts);
 
     BatchWriter bw = null;
-    FileSKVWriter writer = null;
+    RFileWriter writer = null;
 
     if (opts.outputFile != null) {
-      writer = FileOperations
-          .getInstance()
-          .newWriterBuilder()
-          .forFile(opts.outputFile + "." + RFile.EXTENSION, fs, conf,
-              CryptoServiceFactory.newDefaultInstance())
-          .withTableConfiguration(DefaultConfiguration.getInstance()).build();
+      writer = RFile.newWriter().to(opts.outputFile + ".rf").withFileSystem(fs).build();
       writer.startDefaultLocalityGroup();
+
     } else {
       bw = client.createBatchWriter(opts.getTableName(), bwOpts.getBatchWriterConfig());
       client.securityOperations().changeUserAuthorizations(opts.getPrincipal(), AUTHS);


Mime
View raw message