Package org.apache.hadoop.util

Examples of org.apache.hadoop.util.Progressable


    Path logdir = new Path(DIR+methodName+"/logs");
    HColumnDescriptor hcd = new HColumnDescriptor(family);
    HBaseConfiguration conf = new HBaseConfiguration();
    FileSystem fs = FileSystem.get(conf);
    Path reconstructionLog = null;
    Progressable reporter = null;

    fs.delete(logdir, true);

    HTableDescriptor htd = new HTableDescriptor(table);
    htd.addFamily(hcd);
View Full Code Here


      String name, Progressable arg3) throws IOException {

    final FileSystem myFS = fs;
    final String myName = generateLeafFileName(name);
    final JobConf myJob = job;
    final Progressable myProgressable = arg3;

    return new RecordWriter<K, V>() {

      // a cache storing the record writers for different output files.
      TreeMap<String, RecordWriter<K, V>> recordWriters = new TreeMap<String, RecordWriter<K, V>>();
View Full Code Here

        assert jobContext != null;
        // NOTE: Only in Hadoop 2.x, JobContext can be instance of TaskAttemptContext.
        if (TaskAttemptContext.class.isInstance(jobContext)) {
            return TaskAttemptContext.class.cast(jobContext);
        }
        Progressable progressable = jobContext.getProgressible();
        if (progressable == null) {
            LOG.warn(MessageFormat.format(
                    "JobContext has no progressable object: {0}",
                    jobContext.getClass().getName()));
        }
View Full Code Here

    long blockSize = fs.getDefaultBlockSize(f);
    CreateOpts.BlockSize blockOpt = CreateOpts.getOpt(
        CreateOpts.BlockSize.class, opts);
    blockSize = (blockOpt != null) ? blockOpt.getValue() : blockSize;
    // Progressable
    Progressable progress = null;
    CreateOpts.Progress progressOpt = CreateOpts.getOpt(
        CreateOpts.Progress.class, opts);
    progress = (progressOpt != null) ? progressOpt.getValue() : progress;
    return fs.create(f, permission, overwrite, bufferSize, replication,
        blockSize, progress);
View Full Code Here

  private Directory _directory;
  private Progressable _progressable;

  public ProgressableDirectory(Directory directory, Progressable progressable) {
    _directory = directory;
    _progressable = progressable == null ? new Progressable() {
      @Override
      public void progress() {

      }
    } : progressable;
View Full Code Here

        region = new HRegion(
            HTableDescriptor.getTableDir(rootDir,
                regionInfo.getTableDesc().getName()
            ),
            this.log, this.fs, conf, regionInfo, null, this.cacheFlusher,
            new Progressable() {
              public void progress() {
                addProcessingMessage(regionInfo);
              }
            }
        );
View Full Code Here

  protected HRegion instantiateRegion(final HRegionInfo regionInfo)
      throws IOException {
    HRegion r = new HRegion(HTableDescriptor.getTableDir(rootDir, regionInfo
        .getTableDesc().getName()), this.log, this.fs, conf, regionInfo,
        this.cacheFlusher);
    r.initialize(null,  new Progressable() {
      public void progress() {
        addProcessingMessage(regionInfo);
      }
    });
    return r;
View Full Code Here

  protected HRegion instantiateRegion(final HRegionInfo regionInfo)
      throws IOException {
    HRegion r = new TransactionalRegion(HTableDescriptor.getTableDir(super
        .getRootDir(), regionInfo.getTableDesc().getName()), super.log, super
        .getFileSystem(), super.conf, regionInfo, super.getFlushRequester());
    r.initialize(null, new Progressable() {
      public void progress() {
        addProcessingMessage(regionInfo);
      }
    });
    return r;
View Full Code Here

  protected HRegion instantiateRegion(final HRegionInfo regionInfo)
      throws IOException {
    HRegion r = new IndexedRegion(HTableDescriptor.getTableDir(super
        .getRootDir(), regionInfo.getTableDesc().getName()), super.log, super
        .getFileSystem(), super.conf, regionInfo, super.getFlushRequester());
    r.initialize(null, new Progressable() {
      public void progress() {
        addProcessingMessage(regionInfo);
      }
    });
    return r;
View Full Code Here

        region = new HRegion(
            HTableDescriptor.getTableDir(rootDir,
                regionInfo.getTableDesc().getName()
            ),
            this.log, this.fs, conf, regionInfo, null, this.cacheFlusher,
            new Progressable() {
              public void progress() {
                addProcessingMessage(regionInfo);
              }
            }
        );
View Full Code Here

TOP

Related Classes of org.apache.hadoop.util.Progressable

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 coftware#gmail.com.