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 2019/05/02 14:52:25 UTC

[GitHub] [accumulo] milleruntime commented on a change in pull request #1132: Refs #811: Added a couple Tests to AccumuloOutputFormat

milleruntime commented on a change in pull request #1132: Refs #811: Added a couple Tests to AccumuloOutputFormat 
URL: https://github.com/apache/accumulo/pull/1132#discussion_r280456258
 
 

 ##########
 File path: hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/mapred/AccumuloOutputFormatTest.java
 ##########
 @@ -91,4 +93,43 @@ public void testJobStoreException() throws Exception {
     } catch (IllegalStateException e) {}
   }
 
+  @Test
+  public void testCreateTables() {
+    JobConf job = new JobConf();
+    String tableName = "test_create_tables";
+
+    Properties cp = Accumulo.newClientProperties().to("test", "zk").as("blah", "blah").build();
+
+    AccumuloOutputFormat.configure().clientProperties(cp).defaultTable(tableName).createTables(true)
+        .store(job);
+
+    assertEquals("Should have been able to create table", true,
+        OutputConfigurator.canCreateTables(AccumuloOutputFormat.class, job));
+  }
+
+  @Test
+  public void testClientPropertiesPath() throws Exception {
+    JobConf job = new JobConf();
+    Properties cp = Accumulo.newClientProperties().to("test", "zk").as("blah", "blah").build();
+
+    try {
+      File file = File.createTempFile("accumulo-client", ".properties", null);
+      file.deleteOnExit();
 
 Review comment:
   This is cool!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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