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



##########
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:
       yea "simple_data.json" does not exist.




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