yanghua commented on a change in pull request #1884:
URL: https://github.com/apache/hudi/pull/1884#discussion_r463351355



##########
File path: 
hudi-common/src/test/java/org/apache/hudi/common/testutils/SchemaTestUtil.java
##########
@@ -66,24 +68,24 @@ public static Schema getSimpleSchema() throws IOException {
       throws IOException, URISyntaxException {
     GenericDatumReader<IndexedRecord> reader = new 
GenericDatumReader<>(writerSchema, readerSchema);
     // Required to register the necessary JAR:// file system
-    URI resource = 
SchemaTestUtil.class.getClass().getResource("/sample.data").toURI();
+    URI resource = 
SchemaTestUtil.class.getResource(RESOURCE_SAMPLE_DATA).toURI();
     Path dataPath;
     if (resource.toString().contains("!")) {
       dataPath = uriToPath(resource);
     } else {
-      dataPath = 
Paths.get(SchemaTestUtil.class.getClass().getResource("/sample.data").toURI());
+      dataPath = 
Paths.get(SchemaTestUtil.class.getResource(RESOURCE_SAMPLE_DATA).toURI());
     }
 
     try (Stream<String> stream = Files.lines(dataPath)) {
       return stream.skip(from).limit(limit).map(s -> {
         try {
           return reader.read(null, 
DecoderFactory.get().jsonDecoder(writerSchema, s));
         } catch (IOException e) {
-          throw new HoodieIOException("Could not read data from 
simple_data.json", e);
+          throw new HoodieIOException("Could not read data from " + 
RESOURCE_SAMPLE_DATA, e);

Review comment:
       Is the old `simple_data.json` not correct, right?

##########
File path: 
hudi-client/src/test/java/org/apache/hudi/index/bloom/TestHoodieBloomIndex.java
##########
@@ -73,9 +72,7 @@
 
 public class TestHoodieBloomIndex extends HoodieClientTestHarness {
 
-  private String schemaStr;
-  private Schema schema;
-
+  private static final Schema SCHEMA = 
getSchemaFromResource(TestHoodieGlobalBloomIndex.class, "/exampleSchema.txt", 
true);

Review comment:
       May it be `TestHoodieBloomIndex.class`?




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


Reply via email to