HBase
  1. HBase
  2. HBASE-11335

Fix the TABLE_DIR param in TableSnapshotInputFormat

    Details

      Description

      In class TableSnapshotInputFormat or TableSnapshotInputFormatImpl
      in the function

      public static void setInput(Job job, String snapshotName, Path restoreDir) throws IOException {
      

      we are setting restoreDir (temporary root) to tableDir

      conf.set(TABLE_DIR_KEY, restoreDir.toString());
      

      The above parameter is used to get the InputSplits, especially for
      calculating favorable hosts in the function

      Path tableDir = new Path(conf.get(TABLE_DIR_KEY));
      
      List<String> hosts = getBestLocations(conf,
                HRegion.computeHDFSBlocksDistribution(conf, htd, hri, tableDir));
      

      This will lead to returning a empty HDFSBlocksDistribution, as there is
      will be no directory with name as the region name from hri in the restored
      root directory, which will lead to scheduling of non local tasks.

      The change is simple in the sense, is to call the

      FSUtils.getTableDir(rootDir, tableDesc.getTableName()) 

      in the getSplits function

      more discussion in the comments below

      https://issues.apache.org/jira/browse/HBASE-8369?focusedCommentId=14012085&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14012085

      1. HBASE_11335-0.96-v1.patch
        3 kB
        deepankar
      2. HBASE_11335-trunk-v1.patch
        2 kB
        deepankar

        Activity

        Enis Soztutar made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Enis Soztutar made changes -
        Fix Version/s 0.96.3 [ 12326538 ]
        Enis Soztutar made changes -
        Fix Version/s 0.98.4 [ 12326810 ]
        Enis Soztutar made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Fix Version/s 0.99.0 [ 12325675 ]
        Resolution Fixed [ 1 ]
        Matteo Bertozzi made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        deepankar made changes -
        Field Original Value New Value
        Attachment HBASE_11335-0.96-v1.patch [ 12649957 ]
        Attachment HBASE_11335-trunk-v1.patch [ 12649958 ]
        deepankar created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            deepankar
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development