Package org.apache.hadoop.util

Examples of org.apache.hadoop.util.Progressable


    int bufferSize = -1;
    short replication = -1;
    long blockSize = -1;
    int bytesPerChecksum = -1;
    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


  public RecordWriter<K, V> getRecordWriter(FileSystem fs, Configuration job, String name, Progressable arg3) {

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

    return new RecordWriter<K, V>() {

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

      IllegalAccessException, InstantiationException, IOException {
    ImmutableClassesGiraphConfiguration conf =
        Mockito.mock(ImmutableClassesGiraphConfiguration.class);
    Mockito.when(conf.getAggregatorWriterClass()).thenReturn(
        TextAggregatorWriter.class);
    Progressable progressable = Mockito.mock(Progressable.class);
    MasterAggregatorHandler handler =
        new MasterAggregatorHandler(conf, progressable);

    String regularAggName = "regular";
    LongWritable regularValue = new LongWritable(5);
View Full Code Here

  private Progressable stubContext;

  private Progressable getStubProgressable() {
    if (stubContext == null)
      stubContext = new Progressable() {
        @Override
        public void progress() {
          progressCalled.incrementAndGet();
        }
      };
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 seqid  > current wal seqid, the wal seqid is updated.
View Full Code Here

                jobConf,
                new Path(filePath),
                Text.class,
                compressionCodec != null,
                tableProperties,
                new Progressable()
                {
                    @Override
                    public void progress()
                    {
                    }
View Full Code Here

   
    InputStream in = new BufferedInputStream(new FileInputStream(localSrc));
   
    Configuration conf = new Configuration();
    FileSystem fs = FileSystem.get(URI.create(dst), conf);
    OutputStream out = fs.create(new Path(dst), new Progressable() {
      public void progress() {
        System.out.print(".");
      }
    });
   
View Full Code Here

        }

        final Path file = new Path(new File("target/test/test-camel-string").getAbsolutePath());
        Configuration conf = new Configuration();
        FileSystem fs1 = FileSystem.get(file.toUri(), conf);
        ArrayFile.Writer writer = new ArrayFile.Writer(conf, fs1, "target/test/test-camel-string1", Text.class, CompressionType.NONE, new Progressable() {
            @Override
            public void progress() {
            }
        });
        Text valueWritable = new Text();
View Full Code Here

        }

        final Path file = new Path(new File("target/test/test-camel-string").getAbsolutePath());
        Configuration conf = new Configuration();
        FileSystem fs1 = FileSystem.get(file.toUri(), conf);
        ArrayFile.Writer writer = new ArrayFile.Writer(conf, fs1, "target/test/test-camel-string1", Text.class, CompressionType.NONE, new Progressable() {
            @Override
            public void progress() {
            }
        });
        Text valueWritable = new Text();
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

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.