Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-8209

Support different number of datanode directories in MiniDFSCluster.

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: test
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      I want to create MiniDFSCluster with 2 datanode and for each datanode I want to set different number of StorageTypes, but in this case I am getting ArrayIndexOutOfBoundsException.

      My cluster schema is like this.

      final MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf)
      				.numDataNodes(2)
      				.storageTypes(new StorageType[][] {{ StorageType.DISK, StorageType.ARCHIVE },{ StorageType.DISK } })
      				.build();
      

      Exception :

      java.lang.ArrayIndexOutOfBoundsException: 1
      	at org.apache.hadoop.hdfs.MiniDFSCluster.makeDataNodeDirs(MiniDFSCluster.java:1218)
      	at org.apache.hadoop.hdfs.MiniDFSCluster.startDataNodes(MiniDFSCluster.java:1402)
      	at org.apache.hadoop.hdfs.MiniDFSCluster.initMiniDFSCluster(MiniDFSCluster.java:832)
      

        Attachments

        1. HDFS-8209_1.patch
          4 kB
          Surendra Singh Lilhore
        2. HDFS-8209.patch
          4 kB
          Surendra Singh Lilhore

          Activity

            People

            • Assignee:
              surendrasingh Surendra Singh Lilhore
              Reporter:
              surendrasingh Surendra Singh Lilhore
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: