gpt4 book ai didi

org.apache.crunch.types.writable.Writables.bytes()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-27 05:49:05 27 4
gpt4 key购买 nike

本文整理了Java中org.apache.crunch.types.writable.Writables.bytes()方法的一些代码示例,展示了Writables.bytes()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Writables.bytes()方法的具体详情如下:
包路径:org.apache.crunch.types.writable.Writables
类名称:Writables
方法名:bytes

Writables.bytes介绍

暂无

代码示例

代码示例来源:origin: org.apache.crunch/crunch-core

public PType<ByteBuffer> bytes() {
 return Writables.bytes();
}

代码示例来源:origin: org.apache.crunch/crunch

public PType<ByteBuffer> bytes() {
 return Writables.bytes();
}

代码示例来源:origin: cloudera/crunch

public PType<ByteBuffer> bytes() {
 return Writables.bytes();
}

代码示例来源:origin: org.apache.crunch/crunch-hbase

private static <C> List<KeyValue> getSplitPoints(HTable table, PTable<C, Void> affectedRows) throws IOException {
 List<byte[]> startKeys;
 try {
  startKeys = Lists.newArrayList(table.getStartKeys());
  if (startKeys.isEmpty()) {
   throw new AssertionError(table + " has no regions!");
  }
 } catch (IOException e) {
  throw new CrunchRuntimeException(e);
 }
 Collections.sort(startKeys, Bytes.BYTES_COMPARATOR);
 Iterable<ByteBuffer> bufferedStartKeys = affectedRows
     .parallelDo(new DetermineAffectedRegionsFn(startKeys), Writables.bytes()).materialize();
 // set to get rid of the potential duplicate start keys emitted
 ImmutableSet.Builder<KeyValue> startKeyBldr = ImmutableSet.builder();
 for (final ByteBuffer bufferedStartKey : bufferedStartKeys) {
  startKeyBldr.add(KeyValueUtil.createFirstOnRow(bufferedStartKey.array()));
 }
 return ImmutableList.copyOf(startKeyBldr.build());
}

代码示例来源:origin: org.apache.crunch/crunch-hbase

public static final PType<Result> results() {
 return Writables.derived(Result.class,
   new MapInFn<Result>(Result.class, ResultSerialization.class),
   new MapOutFn<Result>(Result.class, ResultSerialization.class),
   Writables.bytes());
}

代码示例来源:origin: apache/crunch

public static final PType<Delete> deletes() {
 return Writables.derived(Delete.class,
   new MapInFn<Delete>(Delete.class, MutationSerialization.class),
   new MapOutFn<Delete>(Delete.class, MutationSerialization.class),
   Writables.bytes());
}

代码示例来源:origin: apache/crunch

public static final PType<Result> results() {
 return Writables.derived(Result.class,
   new MapInFn<Result>(Result.class, ResultSerialization.class),
   new MapOutFn<Result>(Result.class, ResultSerialization.class),
   Writables.bytes());
}

代码示例来源:origin: org.apache.crunch/crunch-hbase

public static final PType<Put> puts() {
 return Writables.derived(Put.class,
   new MapInFn<Put>(Put.class, MutationSerialization.class),
   new MapOutFn<Put>(Put.class, MutationSerialization.class),
   Writables.bytes());
}

代码示例来源:origin: apache/crunch

private static <C> List<KeyValue> getSplitPoints(RegionLocator regionLocator, PTable<C, Void> affectedRows) throws IOException {
 List<byte[]> startKeys;
 try {
  startKeys = Lists.newArrayList(regionLocator.getStartKeys());
  if (startKeys.isEmpty()) {
   throw new AssertionError(regionLocator.getName().getNameAsString() + " has no regions!");
  }
 } catch (IOException e) {
  throw new CrunchRuntimeException(e);
 }
 Collections.sort(startKeys, Bytes.BYTES_COMPARATOR);
 Iterable<ByteBuffer> bufferedStartKeys = affectedRows
     .parallelDo(new DetermineAffectedRegionsFn(startKeys), Writables.bytes()).materialize();
 // set to get rid of the potential duplicate start keys emitted
 ImmutableSet.Builder<KeyValue> startKeyBldr = ImmutableSet.builder();
 for (final ByteBuffer bufferedStartKey : bufferedStartKeys) {
  startKeyBldr.add(KeyValueUtil.createFirstOnRow(bufferedStartKey.array()));
 }
 return ImmutableList.copyOf(startKeyBldr.build());
}

代码示例来源:origin: org.apache.crunch/crunch-hbase

public static final PType<Delete> deletes() {
 return Writables.derived(Delete.class,
   new MapInFn<Delete>(Delete.class, MutationSerialization.class),
   new MapOutFn<Delete>(Delete.class, MutationSerialization.class),
   Writables.bytes());
}

代码示例来源:origin: apache/crunch

public static final PType<Put> puts() {
 return Writables.derived(Put.class,
   new MapInFn<Put>(Put.class, MutationSerialization.class),
   new MapOutFn<Put>(Put.class, MutationSerialization.class),
   Writables.bytes());
}

代码示例来源:origin: cloudera/seismichadoop

cmdLine.getOptionValue("input"), Writables.bytes()));
Pair<List<String>, String> cmd = parse(cmdLine.getOptionValue("command"));
PCollection<ByteBuffer> result = constructPipeline(traces, clusterCwproot, cmd.first());

代码示例来源:origin: apache/crunch

PTable<ByteBuffer, C> cellsByRow = cells.by(new ExtractRowFn<C>(), bytes());
final int versions = scan.getMaxVersions();
return cellsByRow.groupByKey().parallelDo("CombineKeyValueIntoRow",

代码示例来源:origin: org.apache.crunch/crunch-hbase

PTable<ByteBuffer, C> cellsByRow = cells.by(new ExtractRowFn<C>(), bytes());
final int versions = scan.getMaxVersions();
return cellsByRow.groupByKey().parallelDo("CombineKeyValueIntoRow",

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com