[ 
https://issues.apache.org/jira/browse/GOBBLIN-1011?focusedWorklogId=362656&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-362656
 ]

ASF GitHub Bot logged work on GOBBLIN-1011:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 23/Dec/19 19:04
            Start Date: 23/Dec/19 19:04
    Worklog Time Spent: 10m 
      Work Description: autumnust commented on pull request #2856: 
[GOBBLIN-1011] adjust compaction flow to work with virtual partition
URL: https://github.com/apache/incubator-gobblin/pull/2856#discussion_r360973628
 
 

 ##########
 File path: 
gobblin-compaction/src/test/java/org/apache/gobblin/compaction/mapreduce/AvroCompactionTaskTest.java
 ##########
 @@ -103,6 +105,41 @@ public void testNonDedup() throws Exception {
     Assert.assertTrue(result.isSuccessful());
   }
 
+  @Test
+  public void testCompactVirtualDataset() throws Exception {
+
+    File basePath = Files.createTempDir();
+    basePath.deleteOnExit();
+
+    File jobDir = new File(basePath, "PageViewEvent");
+    Assert.assertTrue(jobDir.mkdirs());
+
+    String pattern = new Path(basePath.getAbsolutePath(), "*").toString();
+    String jobName = "compaction-virtual";
+
+    EmbeddedGobblin embeddedGobblin = new EmbeddedGobblin(jobName)
+        .setConfiguration(ConfigurationKeys.SOURCE_CLASS_KEY, 
CompactionSource.class.getName())
+        
.setConfiguration(ConfigurableGlobDatasetFinder.DATASET_FINDER_PATTERN_KEY, 
pattern)
+        .setConfiguration(MRCompactor.COMPACTION_INPUT_DIR, 
basePath.toString())
+        .setConfiguration(MRCompactor.COMPACTION_INPUT_SUBDIR, "hourly")
+        .setConfiguration(MRCompactor.COMPACTION_DEST_DIR, basePath.toString())
+        .setConfiguration(MRCompactor.COMPACTION_DEST_SUBDIR, "daily")
+        .setConfiguration(MRCompactor.COMPACTION_TMP_DEST_DIR, 
"/tmp/compaction/" + jobName)
+        
.setConfiguration(TimeBasedSubDirDatasetsFinder.COMPACTION_TIMEBASED_MAX_TIME_AGO,
 "3d")
+        
.setConfiguration(TimeBasedSubDirDatasetsFinder.COMPACTION_TIMEBASED_MIN_TIME_AGO,
 "1d")
+        .setConfiguration(ConfigurationKeys.MAX_TASK_RETRIES_KEY, "0")
+        .setConfiguration(DatasetUtils.DATASET_PROFILE_CLASS_KEY,
+            
"org.apache.gobblin.data.management.dataset.TimePartitionGlobFinder")
+        .setConfiguration(TimePartitionGlobFinder.PARTITION_PREFIX, "hourly/")
+        .setConfiguration(TimePartitionGlobFinder.TIME_FORMAT, "yyyy/MM/dd")
+        .setConfiguration(TimePartitionGlobFinder.GRANULARITY, "DAY")
+        .setConfiguration(TimePartitionGlobFinder.LOOKBACK_SPEC, "P3D")
+        .setConfiguration(TimePartitionGlobFinder.ENABLE_VIRTUAL_PARTITION, 
"true");
+
+    JobExecutionResult result = embeddedGobblin.run();
+    Assert.assertTrue(result.isSuccessful());
 
 Review comment:
   Shall we need to verify the contents of execution beyond simply verifying if 
the exception is successful ? 
 
----------------------------------------------------------------
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:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 362656)
    Time Spent: 1h 40m  (was: 1.5h)

> Adjust compaction flow to work with virtual partition
> -----------------------------------------------------
>
>                 Key: GOBBLIN-1011
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1011
>             Project: Apache Gobblin
>          Issue Type: Task
>            Reporter: Zhixiong Chen
>            Assignee: Zhixiong Chen
>            Priority: Major
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> - Update existing `CompactionVerifier`s and `CompactionCompleteAction`s to 
> work with virtual simple file system dataset proply
> - Improve ser/de of `FileSystemDataset` in `CompactionSuiteBase`
> - Update gobblin-hive-registration to work with table parameters properly



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to