return Int32Type.instance.decompose(Integer.parseInt(value.toString()));
/** * This returns a dummy value to conform with Hadoop API but isn't used for Cassandra writing */ private ByteBuffer generateDummyValue() { return Int32Type.instance.decompose(1); } }
private static byte[] compose(Object value, Class clazz) { return Int32Type.instance.decompose((Integer) value).array(); }
public ByteBuffer fromString(String source) throws MarshalException { // Return an empty ByteBuffer for an empty string. if (source.isEmpty()) return ByteBufferUtil.EMPTY_BYTE_BUFFER; int int32Type; try { int32Type = Integer.parseInt(source); } catch (Exception e) { throw new MarshalException(String.format("Unable to make int from '%s'", source), e); } return decompose(int32Type); }
public ByteBuffer fromString(String source) throws MarshalException { // Return an empty ByteBuffer for an empty string. if (source.isEmpty()) return ByteBufferUtil.EMPTY_BYTE_BUFFER; int int32Type; try { int32Type = Integer.parseInt(source); } catch (Exception e) { throw new MarshalException(String.format("Unable to make int from '%s'", source), e); } return decompose(int32Type); }
public ByteBuffer fromString(String source) throws MarshalException { // Return an empty ByteBuffer for an empty string. if (source.isEmpty()) return ByteBufferUtil.EMPTY_BYTE_BUFFER; int int32Type; try { int32Type = Integer.parseInt(source); } catch (Exception e) { throw new MarshalException(String.format("unable to make int from '%s'", source), e); } return decompose(int32Type); }
public ByteBuffer fromString(String source) throws MarshalException { // Return an empty ByteBuffer for an empty string. if (source.isEmpty()) return ByteBufferUtil.EMPTY_BYTE_BUFFER; int int32Type; try { int32Type = Integer.parseInt(source); } catch (Exception e) { throw new MarshalException(String.format("Unable to make int from '%s'", source), e); } return decompose(int32Type); }
public ByteBuffer fromString(String source) throws MarshalException { // Return an empty ByteBuffer for an empty string. if (source.isEmpty()) return ByteBufferUtil.EMPTY_BYTE_BUFFER; int int32Type; try { int32Type = Integer.parseInt(source); } catch (Exception e) { throw new MarshalException(String.format("Unable to make int from '%s'", source), e); } return decompose(int32Type); }
return Int32Type.instance.decompose((int) term.getShort(term.position()));
return Int32Type.instance.decompose((int) term.getShort(term.position()));
return Int32Type.instance.decompose((int) term.getShort(term.position()));
return ByteBuffer.wrap(new DataByteArray((String)o).get()); if (o instanceof Integer) return Int32Type.instance.decompose((Integer)o); if (o instanceof Long) return LongType.instance.decompose((Long)o);
bb = Int32Type.instance.decompose(v);
bb = Int32Type.instance.decompose(v);
bb = Int32Type.instance.decompose(v);
case INT: final Integer intData = (Integer) rawData; bb = Int32Type.instance.decompose(intData); break; case LONG:
bb = Int32Type.instance.decompose(v);