Package org.kiji.schema

Examples of org.kiji.schema.KijiCellEncoder


    // If passed value is null, then let encoded value be null.
    // HBase will check for non-existence of cell.
    if (null == value) {
      encoded = null;
    } else {
      final KijiCellEncoder cellEncoder =
          capsule.getCellEncoderProvider().getEncoder(family, qualifier);
      encoded = cellEncoder.encode(value);
    }

    SchemaPlatformBridge bridge = SchemaPlatformBridge.get();
    for (KeyValue kv : mHopper) {
      bridge.addKVToPut(mPut, kv);
View Full Code Here


    final WriterLayoutCapsule capsule = getWriterLayoutCapsule();
    final KijiColumnName kijiColumnName = KijiColumnName.create(family, qualifier);
    final HBaseColumnName columnName =
        capsule.getColumnNameTranslator().toHBaseColumnName(kijiColumnName);

    final KijiCellEncoder cellEncoder =
        capsule.getCellEncoderProvider().getEncoder(family, qualifier);
    final byte[] encoded = cellEncoder.encode(value);

    mHopper.add(new KeyValue(
        mId, columnName.getFamily(), columnName.getQualifier(), timestamp, encoded));
  }
View Full Code Here

    final KijiColumnName columnName = KijiColumnName.create(family, qualifier);
    final HBaseKijiTableWriter.WriterLayoutCapsule capsule = mWriterLayoutCapsule;
    final HBaseColumnName hbaseColumnName =
        capsule.getColumnNameTranslator().toHBaseColumnName(columnName);

    final KijiCellEncoder cellEncoder =
        capsule.getCellEncoderProvider().getEncoder(family, qualifier);
    final byte[] encoded = cellEncoder.encode(value);

    updateBuffer(entityId, hbaseColumnName.getFamily(), hbaseColumnName.getQualifier(), timestamp,
        encoded);
  }
View Full Code Here

    @Override
    public byte[] getHBaseCellValue(KijiColumnName column, DecodedCell<?> kijiCell)
        throws IOException {
      final CellSpec cellSpec = mColumnNameTranslator.getTableLayout().getCellSpec(column)
          .setSchemaTable(mSchemaTable);
      final KijiCellEncoder encoder = DefaultKijiCellEncoderFactory.get().create(cellSpec);
      return encoder.encode(kijiCell);
    }
View Full Code Here

          .setColumnURI(
              KijiURI.newBuilder(tableURI).withColumnNames(ImmutableList.of(column)).build())
          .setSchemaTable(schemaTable)
          .setEncoderFactory(factory);

      final KijiCellEncoder encoder = cellSpec.getEncoderFactory().create(cellSpec);
      encoderMap.put(column.getName(), encoder);
    }
    mEncoderMap = ImmutableMap.copyOf(encoderMap);
  }
View Full Code Here

   *     type family.
   * @throws IOException on I/O error.
   */
  public KijiCellEncoder getEncoder(String family, String qualifier) throws IOException {
    final String column = (qualifier != null) ? (family + ":" + qualifier) : family;
    final KijiCellEncoder encoder = mEncoderMap.get(column);
    if (encoder != null) {
      // There already exists a encoder for this column:
      return encoder;
    }

View Full Code Here

    final KijiColumnName columnName = KijiColumnName.create(family, qualifier);
    final WriterLayoutCapsule capsule = mWriterLayoutCapsule;
    final HBaseColumnName hbaseColumnName =
        capsule.getColumnNameTranslator().toHBaseColumnName(columnName);

    final KijiCellEncoder cellEncoder =
        capsule.getCellEncoderProvider().getEncoder(family, qualifier);
    final byte[] encoded = cellEncoder.encode(value);

    final Put put = new Put(entityId.getHBaseRowKey())
        .add(hbaseColumnName.getFamily(), hbaseColumnName.getQualifier(), timestamp, encoded);
    mHTable.put(put);
  }
View Full Code Here

TOP

Related Classes of org.kiji.schema.KijiCellEncoder

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.