This is an automated email from the ASF dual-hosted git repository.

vinoth pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hudi.git


The following commit(s) were added to refs/heads/master by this push:
     new 7d66831  [MINOR] Removing code which is duplicated from the base class 
HoodieWriteHandle. (#1399)
7d66831 is described below

commit 7d668314447650243ec5c872229efdd02fb0212c
Author: Prashant Wason <pwa...@uber.com>
AuthorDate: Wed Mar 11 16:43:04 2020 -0700

    [MINOR] Removing code which is duplicated from the base class 
HoodieWriteHandle. (#1399)
---
 .../java/org/apache/hudi/io/HoodieMergeHandle.java | 54 ----------------------
 1 file changed, 54 deletions(-)

diff --git 
a/hudi-client/src/main/java/org/apache/hudi/io/HoodieMergeHandle.java 
b/hudi-client/src/main/java/org/apache/hudi/io/HoodieMergeHandle.java
index 078c47f..199c0a0 100644
--- a/hudi-client/src/main/java/org/apache/hudi/io/HoodieMergeHandle.java
+++ b/hudi-client/src/main/java/org/apache/hudi/io/HoodieMergeHandle.java
@@ -93,65 +93,11 @@ public class HoodieMergeHandle<T extends 
HoodieRecordPayload> extends HoodieWrit
   }
 
   @Override
-  public Path makeNewPath(String partitionPath) {
-    Path path = FSUtils.getPartitionPath(config.getBasePath(), partitionPath);
-    try {
-      fs.mkdirs(path); // create a new partition as needed.
-    } catch (IOException e) {
-      throw new HoodieIOException("Failed to make dir " + path, e);
-    }
-
-    return new Path(path.toString(), FSUtils.makeDataFileName(instantTime, 
writeToken, fileId));
-  }
-
-  @Override
   public Schema getWriterSchema() {
     return writerSchema;
   }
 
   /**
-   * Determines whether we can accept the incoming records, into the current 
file. Depending on
-   * <p>
-   * - Whether it belongs to the same partitionPath as existing records - 
Whether the current file written bytes lt max
-   * file size
-   */
-  @Override
-  public boolean canWrite(HoodieRecord record) {
-    return false;
-  }
-
-  /**
-   * Perform the actual writing of the given record into the backing file.
-   */
-  @Override
-  public void write(HoodieRecord record, Option<IndexedRecord> insertValue) {
-    // NO_OP
-  }
-
-  /**
-   * Perform the actual writing of the given record into the backing file.
-   */
-  @Override
-  public void write(HoodieRecord record, Option<IndexedRecord> avroRecord, 
Option<Exception> exception) {
-    Option recordMetadata = record.getData().getMetadata();
-    if (exception.isPresent() && exception.get() instanceof Throwable) {
-      // Not throwing exception from here, since we don't want to fail the 
entire job for a single record
-      writeStatus.markFailure(record, exception.get(), recordMetadata);
-      LOG.error("Error writing record " + record, exception.get());
-    } else {
-      write(record, avroRecord);
-    }
-  }
-
-  /**
-   * Rewrite the GenericRecord with the Schema containing the Hoodie Metadata 
fields.
-   */
-  @Override
-  protected GenericRecord rewriteRecord(GenericRecord record) {
-    return HoodieAvroUtils.rewriteRecord(record, writerSchema);
-  }
-
-  /**
    * Extract old file path, initialize StorageWriter and WriteStatus.
    */
   private void init(String fileId, String partitionPath, HoodieBaseFile 
dataFileToBeMerged) {

Reply via email to