当前位置: 首页>>代码示例>>Java>>正文


Java ProtobufUtil.toFilter方法代码示例

本文整理汇总了Java中org.apache.hadoop.hbase.protobuf.ProtobufUtil.toFilter方法的典型用法代码示例。如果您正苦于以下问题:Java ProtobufUtil.toFilter方法的具体用法?Java ProtobufUtil.toFilter怎么用?Java ProtobufUtil.toFilter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.hadoop.hbase.protobuf.ProtobufUtil的用法示例。


在下文中一共展示了ProtobufUtil.toFilter方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: serializeFilter

import org.apache.hadoop.hbase.protobuf.ProtobufUtil; //导入方法依赖的package包/类
public static byte[] serializeFilter(Filter filter) {
  if (filter == null) {
    return null;
  }
  try {
    FilterProtos.Filter pbFilter = ProtobufUtil.toFilter(filter);
    return pbFilter.toByteArray();
  } catch (IOException e) {
    throw new DrillRuntimeException("Error serializing filter: " + filter, e);
  }
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:12,代码来源:HBaseUtils.java

示例2: deserializeFilter

import org.apache.hadoop.hbase.protobuf.ProtobufUtil; //导入方法依赖的package包/类
public static Filter deserializeFilter(byte[] filterBytes) {
  if (filterBytes == null) {
    return null;
  }
  try {
    FilterProtos.Filter pbFilter = FilterProtos.Filter.parseFrom(filterBytes);
    return ProtobufUtil.toFilter(pbFilter);
  } catch (Exception e) {
    throw new DrillRuntimeException("Error deserializing filter: " + filterBytes, e);
  }
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:12,代码来源:HBaseUtils.java

示例3: serializeFilter

import org.apache.hadoop.hbase.protobuf.ProtobufUtil; //导入方法依赖的package包/类
public static byte[] serializeFilter(Filter filter) {
  if (filter == null) {
    return null;
  }
  try {
    FilterProtos.Filter pbFilter = ProtobufUtil.toFilter(filter);
    return pbFilter.toByteArray();
  } catch (IOException e) {
    throw new RuntimeException("Error serializing filter: " + filter, e);
  }
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:12,代码来源:HBaseUtils.java

示例4: deserializeFilter

import org.apache.hadoop.hbase.protobuf.ProtobufUtil; //导入方法依赖的package包/类
public static Filter deserializeFilter(byte[] filterBytes) {
  if (filterBytes == null) {
    return null;
  }
  try {
    FilterProtos.Filter pbFilter = FilterProtos.Filter.parseFrom(filterBytes);
    return ProtobufUtil.toFilter(pbFilter);
  } catch (Exception e) {
    throw new RuntimeException("Error deserializing filter: " + filterBytes, e);
  }
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:12,代码来源:HBaseUtils.java

示例5: parseFrom

import org.apache.hadoop.hbase.protobuf.ProtobufUtil; //导入方法依赖的package包/类
/**
 * @param pbBytes A pb serialized {@link FilterWrapper} instance
 * @return An instance of {@link FilterWrapper} made from <code>bytes</code>
 * @throws org.apache.hadoop.hbase.exceptions.DeserializationException
 * @see #toByteArray
 */
public static FilterWrapper parseFrom(final byte [] pbBytes)
throws DeserializationException {
  FilterProtos.FilterWrapper proto;
  try {
    proto = FilterProtos.FilterWrapper.parseFrom(pbBytes);
  } catch (InvalidProtocolBufferException e) {
    throw new DeserializationException(e);
  }
  try {
    return new FilterWrapper(ProtobufUtil.toFilter(proto.getFilter()));
  } catch (IOException ioe) {
    throw new DeserializationException(ioe);
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:21,代码来源:FilterWrapper.java

示例6: parseFrom

import org.apache.hadoop.hbase.protobuf.ProtobufUtil; //导入方法依赖的package包/类
/**
 * @param pbBytes A pb serialized {@link WhileMatchFilter} instance
 * @return An instance of {@link WhileMatchFilter} made from <code>bytes</code>
 * @throws org.apache.hadoop.hbase.exceptions.DeserializationException
 * @see #toByteArray
 */
public static WhileMatchFilter parseFrom(final byte [] pbBytes)
throws DeserializationException {
  FilterProtos.WhileMatchFilter proto;
  try {
    proto = FilterProtos.WhileMatchFilter.parseFrom(pbBytes);
  } catch (InvalidProtocolBufferException e) {
    throw new DeserializationException(e);
  }
  try {
    return new WhileMatchFilter(ProtobufUtil.toFilter(proto.getFilter()));
  } catch (IOException ioe) {
    throw new DeserializationException(ioe);
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:21,代码来源:WhileMatchFilter.java

示例7: parseFrom

import org.apache.hadoop.hbase.protobuf.ProtobufUtil; //导入方法依赖的package包/类
/**
 * @param pbBytes A pb serialized {@link SkipFilter} instance
 * @return An instance of {@link SkipFilter} made from <code>bytes</code>
 * @throws DeserializationException
 * @see #toByteArray
 */
public static SkipFilter parseFrom(final byte [] pbBytes)
throws DeserializationException {
  FilterProtos.SkipFilter proto;
  try {
    proto = FilterProtos.SkipFilter.parseFrom(pbBytes);
  } catch (InvalidProtocolBufferException e) {
    throw new DeserializationException(e);
  }
  try {
    return new SkipFilter(ProtobufUtil.toFilter(proto.getFilter()));
  } catch (IOException ioe) {
    throw new DeserializationException(ioe);
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:21,代码来源:SkipFilter.java

示例8: serializationTest

import org.apache.hadoop.hbase.protobuf.ProtobufUtil; //导入方法依赖的package包/类
private Filter serializationTest(Filter filter) throws Exception {
  FilterProtos.Filter filterProto = ProtobufUtil.toFilter(filter);
  Filter newFilter = ProtobufUtil.toFilter(filterProto);

  return newFilter;
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:7,代码来源:TestColumnPaginationFilter.java


注:本文中的org.apache.hadoop.hbase.protobuf.ProtobufUtil.toFilter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。