Examples of SnapshotFileInfo


Examples of org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotFileInfo

          } else {
            String region = regionInfo.getEncodedName();
            String hfile = storeFile.getName();
            Path path = HFileLink.createPath(table, region, family, hfile);

            SnapshotFileInfo fileInfo = SnapshotFileInfo.newBuilder()
              .setType(SnapshotFileInfo.Type.HFILE)
              .setHfile(path.toString())
              .build();

            long size;
            if (storeFile.hasFileSize()) {
              size = storeFile.getFileSize();
            } else {
              size = new HFileLink(conf, path).getFileStatus(fs).getLen();
            }
            files.add(new Pair<SnapshotFileInfo, Long>(fileInfo, size));
          }
        }

        @Override
        public void logFile (final String server, final String logfile)
            throws IOException {
          SnapshotFileInfo fileInfo = SnapshotFileInfo.newBuilder()
            .setType(SnapshotFileInfo.Type.WAL)
            .setWalServer(server)
            .setWalName(logfile)
            .build();
View Full Code Here

Examples of org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotFileInfo

    }

    @Override
    public void map(BytesWritable key, NullWritable value, Context context)
        throws InterruptedException, IOException {
      SnapshotFileInfo inputInfo = SnapshotFileInfo.parseFrom(key.copyBytes());
      Path outputPath = getOutputPath(inputInfo);

      copyFile(context, inputInfo, outputPath);
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotFileInfo

  @Test
  public void testBalanceSplit() throws Exception {
    // Create a list of files
    List<Pair<SnapshotFileInfo, Long>> files = new ArrayList<Pair<SnapshotFileInfo, Long>>();
    for (long i = 0; i <= 20; i++) {
      SnapshotFileInfo fileInfo = SnapshotFileInfo.newBuilder()
        .setType(SnapshotFileInfo.Type.HFILE)
        .setHfile("file-" + i)
        .build();
      files.add(new Pair<SnapshotFileInfo, Long>(fileInfo, i));
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotFileInfo

          } else {
            String region = regionInfo.getEncodedName();
            String hfile = storeFile.getName();
            Path path = HFileLink.createPath(table, region, family, hfile);

            SnapshotFileInfo fileInfo = SnapshotFileInfo.newBuilder()
              .setType(SnapshotFileInfo.Type.HFILE)
              .setHfile(path.toString())
              .build();

            long size;
            if (storeFile.hasFileSize()) {
              size = storeFile.getFileSize();
            } else {
              size = new HFileLink(conf, path).getFileStatus(fs).getLen();
            }
            files.add(new Pair<SnapshotFileInfo, Long>(fileInfo, size));
          }
        }

        @Override
        public void logFile (final String server, final String logfile)
            throws IOException {
          SnapshotFileInfo fileInfo = SnapshotFileInfo.newBuilder()
            .setType(SnapshotFileInfo.Type.WAL)
            .setWalServer(server)
            .setWalName(logfile)
            .build();
View Full Code Here

Examples of org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotFileInfo

    }

    @Override
    public void map(BytesWritable key, NullWritable value, Context context)
        throws InterruptedException, IOException {
      SnapshotFileInfo inputInfo = SnapshotFileInfo.parseFrom(copyBytes(key));
      Path outputPath = getOutputPath(inputInfo);

      copyFile(context, inputInfo, outputPath);
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotFileInfo

  @Test
  public void testBalanceSplit() throws Exception {
    // Create a list of files
    List<Pair<SnapshotFileInfo, Long>> files = new ArrayList<Pair<SnapshotFileInfo, Long>>();
    for (long i = 0; i <= 20; i++) {
      SnapshotFileInfo fileInfo = SnapshotFileInfo.newBuilder()
        .setType(SnapshotFileInfo.Type.HFILE)
        .setHfile("file-" + i)
        .build();
      files.add(new Pair<SnapshotFileInfo, Long>(fileInfo, i));
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotFileInfo

          } else {
            String region = regionInfo.getEncodedName();
            String hfile = storeFile.getName();
            Path path = HFileLink.createPath(table, region, family, hfile);

            SnapshotFileInfo fileInfo = SnapshotFileInfo.newBuilder()
              .setType(SnapshotFileInfo.Type.HFILE)
              .setHfile(path.toString())
              .build();

            long size;
            if (storeFile.hasFileSize()) {
              size = storeFile.getFileSize();
            } else {
              size = new HFileLink(conf, path).getFileStatus(fs).getLen();
            }
            files.add(new Pair<SnapshotFileInfo, Long>(fileInfo, size));
          }
        }

        @Override
        public void logFile (final String server, final String logfile)
            throws IOException {
          SnapshotFileInfo fileInfo = SnapshotFileInfo.newBuilder()
            .setType(SnapshotFileInfo.Type.WAL)
            .setWalServer(server)
            .setWalName(logfile)
            .build();
View Full Code Here

Examples of org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotFileInfo

  @Test
  public void testBalanceSplit() throws Exception {
    // Create a list of files
    List<Pair<SnapshotFileInfo, Long>> files = new ArrayList<Pair<SnapshotFileInfo, Long>>();
    for (long i = 0; i <= 20; i++) {
      SnapshotFileInfo fileInfo = SnapshotFileInfo.newBuilder()
        .setType(SnapshotFileInfo.Type.HFILE)
        .setHfile("file-" + i)
        .build();
      files.add(new Pair<SnapshotFileInfo, Long>(fileInfo, i));
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotFileInfo

    }

    @Override
    public void map(BytesWritable key, NullWritable value, Context context)
        throws InterruptedException, IOException {
      SnapshotFileInfo inputInfo = SnapshotFileInfo.parseFrom(key.copyBytes());
      Path outputPath = getOutputPath(inputInfo);

      copyFile(context, inputInfo, outputPath);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.