accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] milleruntime commented on a change in pull request #880: Make new Bulk Import tableTime take boolean
Date Wed, 09 Jan 2019 16:46:29 GMT
milleruntime commented on a change in pull request #880: Make new Bulk Import tableTime take
boolean
URL: https://github.com/apache/accumulo/pull/880#discussion_r246456993
 
 

 ##########
 File path: test/src/main/java/org/apache/accumulo/test/functional/BulkLoadIT.java
 ##########
 @@ -127,27 +130,42 @@ private void testSingleTabletSingleFile(AccumuloClient c, boolean offline)
throw
 
     String h1 = writeData(dir + "/f1.", aconf, 0, 332);
 
-    c.tableOperations().importDirectory(dir).to(tableName).load();
+    c.tableOperations().importDirectory(dir).to(tableName).tableTime(setTime).load();
 
     if (offline)
       c.tableOperations().online(tableName);
 
-    verifyData(c, tableName, 0, 332);
+    verifyData(c, tableName, 0, 332, setTime);
     verifyMetadata(c, tableName,
         ImmutableMap.of("0333", ImmutableSet.of(h1), "null", ImmutableSet.of()));
   }
 
   @Test
   public void testSingleTabletSingleFile() throws Exception {
     try (AccumuloClient client = createAccumuloClient()) {
-      testSingleTabletSingleFile(client, false);
+      testSingleTabletSingleFile(client, false, false);
+    }
+  }
+
+  @Test
+  public void testSetTime() throws Exception {
+    try (AccumuloClient client = createAccumuloClient()) {
+      tableName = "testSetTime_table1";
+      NewTableConfiguration newTableConf = new NewTableConfiguration();
+      // set logical time type so we can set time on bulk import
+      newTableConf.setTimeType(TimeType.LOGICAL);
+      client.tableOperations().create(tableName, newTableConf);
+      aconf = getCluster().getServerContext().getConfiguration();
+      fs = getCluster().getFileSystem();
+      rootPath = cluster.getTemporaryPath().toString();
+      testSingleTabletSingleFile(client, false, true);
     }
   }
 
   @Test
   public void testSingleTabletSingleFileOffline() throws Exception {
     try (AccumuloClient client = createAccumuloClient()) {
-      testSingleTabletSingleFile(client, true);
+      testSingleTabletSingleFile(client, true, false);
 
 Review comment:
   I don't think its terrible with one or two.  Any more then for sure.  It also helps to
have an IDE that prepens the params with their name. :)
   
   I can open a follow on might be a good help wanted ticket.

----------------------------------------------------------------
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

Mime
View raw message