Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.6.0
-
None
-
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)