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

Fix the typo in MiniDFSCluster class

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.1.0
    • Component/s: test
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      There is a typo SimilatedFSDataset in MiniDFSCluster#injectBlocks.
      In line2748 and line2769:

      public void injectBlocks(int dataNodeIndex,
            Iterable<Block> blocksToInject, String bpid) throws IOException {
          if (dataNodeIndex < 0 || dataNodeIndex > dataNodes.size()) {
            throw new IndexOutOfBoundsException();
          }
          final DataNode dn = dataNodes.get(dataNodeIndex).datanode;
          final FsDatasetSpi<?> dataSet = DataNodeTestUtils.getFSDataset(dn);
          if (!(dataSet instanceof SimulatedFSDataset)) {
            throw new IOException("injectBlocks is valid only for SimilatedFSDataset");
          }
      ...
      }
      

      SimilatedFSDataset should be SimulatedFSDataset.

        Attachments

        1. HDFS-13210.001.patch
          1.0 kB
          fang zhenyi
        2. HDFS-13210.002.patch
          1 kB
          fang zhenyi
        3. HDFS-13210.003.patch
          1 kB
          fang zhenyi

          Activity

            People

            • Assignee:
              zhenyi fang zhenyi
              Reporter:
              linyiqun Yiqun Lin
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: