KumaravelKandasami commented on a change in pull request #2894: GOBBLIN-1054: 
Refactor HiveSource to make partition filter extensible
URL: https://github.com/apache/incubator-gobblin/pull/2894#discussion_r383698568
 
 

 ##########
 File path: 
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/hive/filter/LookbackPartitionFilterGenerator.java
 ##########
 @@ -41,34 +40,44 @@
  *   must be such that lexycographical string and date ordering are compatible.
  * </p>
  */
+@Slf4j
 public class LookbackPartitionFilterGenerator implements 
PartitionFilterGenerator {
 
   public static final String PARTITION_COLUMN = 
HiveDatasetFinder.HIVE_DATASET_PREFIX + ".partition.filter.datetime.column";
   public static final String LOOKBACK = HiveDatasetFinder.HIVE_DATASET_PREFIX 
+ ".partition.filter.datetime.lookback";
   public static final String DATETIME_FORMAT = 
HiveDatasetFinder.HIVE_DATASET_PREFIX + ".partition.filter.datetime.format";
-  private static final String ERROR_MESSAGE = 
LookbackPartitionFilterGenerator.class.getName()
-      + " requires the following properties " + Arrays.toString(new 
String[]{PARTITION_COLUMN, LOOKBACK, DATETIME_FORMAT});
-
-  private final String partitionColumn;
-  private final Period lookback;
-  private final DateTimeFormatter formatter;
 
+  private final Properties prop;
 
   public LookbackPartitionFilterGenerator(Properties properties) {
-    Preconditions.checkArgument(properties.containsKey(PARTITION_COLUMN), 
ERROR_MESSAGE);
 
 Review comment:
   Same ERROR_MESSAGE is printed when the validation is false in the 
getFilter() method. 
   
   <code>
     log.error(LookbackPartitionFilterGenerator.class.getName()
             + " requires the following properties " + Arrays.toString(new 
String[]{PARTITION_COLUMN, LOOKBACK, DATETIME_FORMAT}));
   <code>

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


With regards,
Apache Git Services

Reply via email to