Codota Logo
CompressorFactory$NativeSupportedCompressor
Code IndexAdd Codota to your IDE (free)

How to use
CompressorFactory$NativeSupportedCompressor
in
org.apache.carbondata.core.datastore.compression

Best Java code snippets using org.apache.carbondata.core.datastore.compression.CompressorFactory$NativeSupportedCompressor (Showing top 11 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: org.apache.carbondata/carbondata-core

private CompressorFactory() {
 for (NativeSupportedCompressor nativeSupportedCompressor : NativeSupportedCompressor.values()) {
  allSupportedCompressors.put(nativeSupportedCompressor.getName(),
    nativeSupportedCompressor.getCompressor());
 }
}
origin: org.apache.carbondata/carbondata-spark2

private byte[] getSyncMarker(String filePath) throws IOException {
 CarbonHeaderReader headerReader = new CarbonHeaderReader(filePath);
 FileHeader header = headerReader.readHeader();
 // legacy store does not have this member
 if (header.isSetCompressor_name()) {
  compressorName = header.getCompressor_name();
 } else {
  compressorName = CompressorFactory.NativeSupportedCompressor.SNAPPY.getName();
 }
 return header.getSync_marker();
}
origin: org.apache.carbondata/carbondata-core

/**
 * Constructor to get minimum parameter to create instance of this class
 *
 * @param blockletInfo
 * @param eachColumnValueSize
 * @param filePath
 */
public CompressedDimensionChunkFileBasedReaderV2(final BlockletInfo blockletInfo,
  final int[] eachColumnValueSize, final String filePath) {
 super(blockletInfo, eachColumnValueSize, filePath);
 // for v2 store, the compressor is snappy
 this.compressor = CompressorFactory.NativeSupportedCompressor.SNAPPY.getCompressor();
}
origin: org.apache.carbondata/carbondata-core

/**
 * Constructor to get minimum parameter to create instance of this class
 *
 * @param blockletInfo BlockletInfo
 * @param filePath     file from which data will be read
 */
public CompressedMeasureChunkFileBasedReaderV2(final BlockletInfo blockletInfo,
  final String filePath) {
 super(blockletInfo, filePath);
 this.compressor = CompressorFactory.NativeSupportedCompressor.SNAPPY.getCompressor();
}
origin: org.apache.carbondata/carbondata-core

/**
 * get the compressor name from chunk meta
 * before 1.5.0, we only support snappy and do not have compressor_name field;
 * after 1.5.0, we directly get the compressor from the compressor_name field
 */
public static String getCompressorNameFromChunkMeta(ChunkCompressionMeta chunkCompressionMeta) {
 if (chunkCompressionMeta.isSetCompressor_name()) {
  return chunkCompressionMeta.getCompressor_name();
 } else {
  // this is for legacy store before 1.5.0
  return CompressorFactory.NativeSupportedCompressor.SNAPPY.getName();
 }
}
/**
origin: org.apache.carbondata/carbondata-core

 @Override
 public ColumnPage decodeColumnPage(MeasureRawColumnChunk measureRawColumnChunk, int pageNumber,
   ReusableDataBuffer reusableDataBuffer) throws IOException, MemoryException {
  int blockIndex = measureRawColumnChunk.getColumnIndex();
  DataChunk dataChunk = measureColumnChunks.get(blockIndex);
  ValueEncoderMeta meta = dataChunk.getValueEncoderMeta().get(0);
  ColumnPageDecoder codec = encodingFactory.createDecoderLegacy(meta,
    CompressorFactory.NativeSupportedCompressor.SNAPPY.getName());
  ColumnPage decodedPage = codec.decode(measureRawColumnChunk.getRawData().array(),
    (int) measureRawColumnChunk.getOffSet(), dataChunk.getDataPageLength());
  decodedPage.setNullBits(dataChunk.getNullValueIndexForColumn());

  return decodedPage;
 }
}
origin: org.apache.carbondata/carbondata-core

/**
 * Constructor to get minimum parameter to create instance of this class
 *
 * @param blockletInfo        blocklet info
 * @param eachColumnValueSize size of the each column value
 * @param filePath            file from which data will be read
 */
public CompressedDimensionChunkFileBasedReaderV1(final BlockletInfo blockletInfo,
  final int[] eachColumnValueSize, final String filePath) {
 super(eachColumnValueSize, filePath, blockletInfo.getNumberOfRows());
 this.dimensionColumnChunk = blockletInfo.getDimensionColumnChunk();
 // for v1 store, the compressor is snappy
 this.compressor = CompressorFactory.NativeSupportedCompressor.SNAPPY.getCompressor();
}
origin: org.apache.carbondata/carbondata-core

/**
 * Convert schema to binary
 */
public static byte[] convertSchemaToBinary(List<ColumnSchema> columnSchemas) throws IOException {
 ByteArrayOutputStream stream = new ByteArrayOutputStream();
 DataOutput dataOutput = new DataOutputStream(stream);
 dataOutput.writeShort(columnSchemas.size());
 for (ColumnSchema columnSchema : columnSchemas) {
  if (columnSchema.getColumnReferenceId() == null) {
   columnSchema.setColumnReferenceId(columnSchema.getColumnUniqueId());
  }
  columnSchema.write(dataOutput);
 }
 byte[] byteArray = stream.toByteArray();
 // Compress to reduce the size of schema
 return CompressorFactory.NativeSupportedCompressor.SNAPPY.getCompressor().compressByte(
   byteArray);
}
origin: org.apache.carbondata/carbondata-core

/**
 * Read column schema from binary
 *
 * @param schemaArray
 * @throws IOException
 */
public static List<ColumnSchema> readColumnSchema(byte[] schemaArray) throws IOException {
 // uncompress it.
 schemaArray = CompressorFactory.NativeSupportedCompressor.SNAPPY.getCompressor().unCompressByte(
   schemaArray);
 ByteArrayInputStream schemaStream = new ByteArrayInputStream(schemaArray);
 DataInput schemaInput = new DataInputStream(schemaStream);
 List<ColumnSchema> columnSchemas = new ArrayList<>();
 int size = schemaInput.readShort();
 for (int i = 0; i < size; i++) {
  ColumnSchema columnSchema = new ColumnSchema();
  columnSchema.readFields(schemaInput);
  columnSchemas.add(columnSchema);
 }
 return columnSchemas;
}
origin: org.apache.carbondata/carbondata-streaming

 compressorName = header.getCompressor_name();
} else {
 compressorName = CompressorFactory.NativeSupportedCompressor.SNAPPY.getName();
origin: org.apache.carbondata/carbondata-core

 protected ColumnPage decodeMeasure(MeasureRawColumnChunk measureRawColumnChunk,
   DataChunk2 measureColumnChunk, int copyPoint, ReusableDataBuffer reusableDataBuffer)
   throws MemoryException, IOException {
  assert (measureColumnChunk.getEncoder_meta().size() > 0);
  List<ByteBuffer> encoder_meta = measureColumnChunk.getEncoder_meta();
  byte[] encodedMeta = encoder_meta.get(0).array();

  ValueEncoderMeta meta = CarbonUtil.deserializeEncoderMetaV2(encodedMeta);
  ColumnPageDecoder codec = encodingFactory.createDecoderLegacy(meta,
    CompressorFactory.NativeSupportedCompressor.SNAPPY.getName());
  byte[] rawData = measureRawColumnChunk.getRawData().array();
  return codec
    .decode(rawData, copyPoint, measureColumnChunk.data_page_length);
 }
}
org.apache.carbondata.core.datastore.compressionCompressorFactory$NativeSupportedCompressor

Most used methods

  • getName
  • getCompressor
    we will load the compressor only if it is needed
  • values

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • getExternalFilesDir (Context)
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • JFileChooser (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Table (org.hibernate.mapping)
    A relational table
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now