Package org.apache.hadoop.fs

Examples of org.apache.hadoop.fs.Path

    for (HbckInfo hbi : regionInfoMap.values()) {
      // Check only valid, working regions
      if (hbi.metaEntry == null) {
        // this assumes that consistency check has run loadMetaEntry
        Path p = hbi.getHdfsRegionDir();
        if (p == null) {
"No regioninfo in Meta or HDFS. " + hbi);

        // TODO test.
View Full Code Here

      return fileMoves;

    for (FileStatus cf : dirs) {
      Path src = cf.getPath();
      Path dst =  new Path(targetRegionDir, src.getName());

      if (src.getName().equals(HRegion.REGIONINFO_FILE)) {
        // do not copy the old .regioninfo file.
View Full Code Here


  public void dumpSidelinedRegions(Map<Path, HbckInfo> regions) {
    for (Map.Entry<Path, HbckInfo> entry: regions.entrySet()) {
      String tableName = Bytes.toStringBinary(entry.getValue().getTableName());
      Path path = entry.getKey();
      errors.print("This sidelined region dir should be bulk loaded: "
        + path.toString());
      errors.print("Bulk load command looks like: "
        + "hbase org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles "
        + path.toUri().getPath() + " "+ tableName);
View Full Code Here

   * @param sidelineDir - HDFS path to sideline data
  public void setSidelineDir(String sidelineDir) {
    this.sidelineDir = new Path(sidelineDir);
View Full Code Here

   * @throws Exception
  public static void main(String[] args) throws Exception {
    // create a fsck object
    Configuration conf = HBaseConfiguration.create();
    Path hbasedir = new Path(conf.get(HConstants.HBASE_DIR));
    URI defaultFs = hbasedir.getFileSystem(conf).getUri();
    conf.set("fs.defaultFS", defaultFs.toString());     // for hadoop 0.21+
    conf.set("", defaultFs.toString())// for hadoop 0.20

    int ret = HBaseFsck(conf), args);
View Full Code Here"Checking all hfiles for corruption");
      HFileCorruptionChecker hfcc = createHFileCorruptionChecker(sidelineCorruptHFiles);
      setHFileCorruptionChecker(hfcc); // so we can get result
      Collection<String> tables = getIncludedTables();
      Collection<Path> tableDirs = new ArrayList<Path>();
      Path rootdir = FSUtils.getRootDir(getConf());
      if (tables.size() > 0) {
        for (String t : tables) {
          tableDirs.add(FSUtils.getTablePath(rootdir, t));
      } else {
View Full Code Here

   * @param snapshotDir directory where the specific snapshot is stored
   * @param serverName name of the parent regionserver for the log files
   * @return path to the log home directory for the archive files.
  public static Path getLogsDir(Path snapshotDir, String serverName) {
    return new Path(snapshotDir, HLog.getHLogDirectoryName(serverName));
View Full Code Here

   * @param snapshotDir directory where the specific snapshot is stored
   * @param regionName name of the region
   * @return path to the recovered.edits directory for the specified region files.
  public static Path getRecoveredEditsDir(Path snapshotDir, String regionName) {
    return HLog.getRegionDirRecoveredEditsDir(new Path(snapshotDir, regionName));
View Full Code Here

   * @param regionName name of the region
   * @param logfile name of the edit file
   * @return full path of the log file for the specified region files.
  public static Path getRecoveredEdits(Path snapshotDir, String regionName, String logfile) {
    return new Path(getRecoveredEditsDir(snapshotDir, regionName), logfile);
View Full Code Here

      // accessors will be going against wrong filesystem (unless all is set
      // to defaults).
      this.conf.set("fs.defaultFS", this.conf.get("hbase.rootdir"));
      // Get fs instance used by this RS
      this.fs = new HFileSystem(this.conf, this.useHBaseChecksum);
      this.rootDir = new Path(this.conf.get(HConstants.HBASE_DIR));
      this.tableDescriptors = new FSTableDescriptors(this.fs, this.rootDir, true);
      this.hlog = setupWALAndReplication();
      // Init in here rather than in constructor after thread name has been set
      this.metrics = new RegionServerMetrics();
      this.dynamicMetrics = RegionServerDynamicMetrics.newInstance(this);
View Full Code Here


Related Classes of org.apache.hadoop.fs.Path

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact