コード例 #1
0
ファイル: Warehouse.java プロジェクト: cnhans/tdw
  private Path getWhRoot(String dbName) throws MetaException {
    if (!multiHdfsInfo.isMultiHdfsEnable()) return getWhRoot();

    Path WHRoot = null;
    WHRoot = new Path(multiHdfsInfo.getHdfsPathFromDB(dbName), whRootString);

    return WHRoot;
  }
コード例 #2
0
ファイル: Warehouse.java プロジェクト: cnhans/tdw
  public Path getDefaultDatabasePath(String dbName, String hdfsScheme) throws MetaException {
    if (hdfsScheme == null || hdfsScheme.isEmpty()) return getDefaultDatabasePath(dbName);
    else {
      if (!multiHdfsInfo.isMultiHdfsEnable()) return getDefaultDatabasePath(dbName);

      if (!(new Path(hdfsScheme).toUri().getScheme()).equalsIgnoreCase("hdfs")) {
        throw new MetaException("wrong scheme:" + hdfsScheme);
      }

      String hdfsSchemeLocal = MultiHdfsInfo.makeQualified(hdfsScheme.trim());

      return new Path(new Path(hdfsSchemeLocal, whRootString), dbName.toLowerCase() + ".db");
    }
  }