Package org.apache.hadoop.util

Examples of org.apache.hadoop.util.Progressable


      boolean fixSource,
      long blockSize, long errorOffset, long limit, boolean partial,
      OutputStream out, Context context, boolean skipVerify)
          throws IOException, InterruptedException {
    configureBuffers(blockSize);
    Progressable reporter = context;
    if (reporter == null) {
      reporter = RaidUtils.NULL_PROGRESSABLE;
    }

    LOG.info("Code: " + this.codec.id + " simulation: " + this.codec.simulateBlockFix);
View Full Code Here


      int initialRefCount = ClientAdapter.getRefCount(client);
      String filename = "/file1";
      DFSOutputStream out = (DFSOutputStream)
        ((DistributedFileSystem) fileSystem).getClient().create(
          filename, FsPermission.getDefault(), true, (short) 5, 1024,
          new Progressable() {
            @Override
            public void progress() {
            }
          },
          64 * 1024
 
View Full Code Here

        // find the right codec
        Class<? extends CompressionCodec> codecClass = getOutputCompressorClass(job, DefaultCodec.class);
        codec = ReflectionUtils.newInstance(codecClass, InputFormatBase.getConfiguration(job));
      }

      Progressable progress = new Progressable() {
        @Override
        public void progress() {
          job.progress();
        }
      };
View Full Code Here

  throws IOException {
    Path dir =
      HTableDescriptor.getTableDir(rootDir, regionInfo.getTableDesc().getName());
    HRegion r = HRegion.newHRegion(dir, this.hlog, this.fs, conf, regionInfo,
      this.cacheFlusher);
    long seqid = r.initialize(new Progressable() {
      public void progress() {
        addProcessingMessage(regionInfo);
      }
    });
    // If a wal and its seqid is < that of new region, use new regions seqid.
View Full Code Here

 
  protected HRegion instantiateRegion(final HRegionInfo regionInfo)
      throws IOException {
    return 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

    short replication = -1;
    long blockSize = -1;
    int bytesPerChecksum = -1;
    ChecksumOpt checksumOpt = null;
    FsPermission permission = null;
    Progressable progress = null;
    Boolean createParent = null;
    for (CreateOpts iOpt : opts) {
      if (CreateOpts.BlockSize.class.isInstance(iOpt)) {
        if (blockSize != -1) {
View Full Code Here

        short replication = replicationOption == null ?
          fs.getDefaultReplication(p) :
          (short) replicationOption.getValue();
        long blockSize = blockSizeOption == null ? fs.getDefaultBlockSize(p) :
          blockSizeOption.getValue();
        Progressable progress = progressOption == null ? null :
          progressOption.getValue();
        out = fs.create(p, true, bufferSize, replication, blockSize, progress);
      } else {
        out = streamOption.getValue();
      }
View Full Code Here

        readsCounter, writesCounter, mergePhase);
    Assert.assertEquals(1.0f, mergeQueue.getProgress().get(), 0.0f);
  }

  private Progressable getReporter() {
    Progressable reporter = new Progressable() {
      @Override
      public void progress() {
      }
    };
    return reporter;
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(), this.transactionLeases);
    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 HRegion(HTableDescriptor.getTableDir(rootDir, regionInfo
        .getTableDesc().getName()), this.hlog, this.fs, conf, regionInfo,
        this.cacheFlusher);
    r.initialize(null,  new Progressable() {
      public void progress() {
        addProcessingMessage(regionInfo);
      }
    });
    return r;
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.