You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2020/01/15 17:57:53 UTC

[GitHub] [incubator-hudi] bvaradar commented on a change in pull request #1109: [HUDI-238] - Migrating to Scala 2.12

bvaradar commented on a change in pull request #1109: [HUDI-238] - Migrating to Scala 2.12
URL: https://github.com/apache/incubator-hudi/pull/1109#discussion_r367015341
 
 

 ##########
 File path: hudi-utilities/src/main/java/org/apache/hudi/utilities/sources/helpers/KafkaOffsetGen.java
 ##########
 @@ -143,29 +139,11 @@ public static long totalNewMessages(OffsetRange[] ranges) {
     }
   }
 
-  /**
-   * Helpers to deal with tricky scala <=> java conversions. (oh my!)
-   */
-  static class ScalaHelpers {
-
-    public static <K, V> Map<K, V> toScalaMap(HashMap<K, V> m) {
-      return JavaConverters.mapAsScalaMapConverter(m).asScala().toMap(Predef.conforms());
-    }
-
-    public static Set<String> toScalaSet(HashSet<String> s) {
-      return JavaConverters.asScalaSetConverter(s).asScala().toSet();
-    }
-
-    public static <K, V> java.util.Map<K, V> toJavaMap(Map<K, V> m) {
-      return JavaConverters.mapAsJavaMapConverter(m).asJava();
-    }
-  }
-
   /**
    * Kafka reset offset strategies.
    */
   enum KafkaResetOffsetStrategies {
-    LARGEST, SMALLEST
+    latest, earliest
 
 Review comment:
   Can you change it to upper case ? Changing from smallest to earliest needs to be documented in release notes. Can you add a ticket ?

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