• Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.0
    • Component/s: None
    • Labels:
    • Target Version/s:
    • Hadoop Flags:


      To write files in parallel to an external storage system as in HDFS-12090, there are two approaches:

      1. Naive approach: use a single datanode per file that copies blocks locally as it streams data to the external service. This requires a copy for each block inside the HDFS system and then a copy for the block to be sent to the external system.
      2. Better approach: Single point (e.g. Namenode or SPS style external client) and Datanodes coordinate in a multipart - multinode upload.

      This system needs to work with multiple back ends and needs to coordinate across the network. So we propose an API that resembles the following:

      public UploadHandle multipartInit(Path filePath) throws IOException;
      public PartHandle multipartPutPart(InputStream inputStream,
          int partNumber, UploadHandle uploadId) throws IOException;
      public void multipartComplete(Path filePath,
          List<Pair<Integer, PartHandle>> handles, 
          UploadHandle multipartUploadId) throws IOException;

      Here, UploadHandle and PartHandle are opaque handlers in the vein of PathHandle so they can be serialized and deserialized in hadoop-hdfs project without knowledge of how to deserialize e.g. S3A's version of a UpoadHandle and PartHandle.

      In an object store such as S3A, the implementation is straight forward. In the case of writing multipart/multinode to HDFS, we can write each block as a file part. The complete call will perform a concat on the blocks.


        1. HDFS-13186.010.patch
          57 kB
          Christopher Douglas
        2. HDFS-13186.009.patch
          57 kB
          Ewan Higgs
        3. HDFS-13186.008.patch
          54 kB
          Christopher Douglas
        4. HDFS-13186.007.patch
          47 kB
          Ewan Higgs
        5. HDFS-13186.006.patch
          45 kB
          Ewan Higgs
        6. HDFS-13186.005.patch
          44 kB
          Ewan Higgs
        7. HDFS-13186.004.patch
          40 kB
          Ewan Higgs
        8. HDFS-13186.003.patch
          35 kB
          Ewan Higgs
        9. HDFS-13186.002.patch
          35 kB
          Ewan Higgs
        10. HDFS-13186.001.patch
          32 kB
          Ewan Higgs

          Issue Links



              • Assignee:
                ehiggs Ewan Higgs
                ehiggs Ewan Higgs
              • Votes:
                0 Vote for this issue
                12 Start watching this issue


                • Created: