@Override public T get(K key, String[] fields) { throw new OperationNotSupportedException( "Avro DataFile's does not support indexed retrieval"); }
/** * Converts a byte array to an int value. * * @param bytes input byte array to be converted. * @return the int value */ public static int toInt(byte[] bytes) { return toInt(bytes, 0); }
/** * Converts a byte array to a char array value. * * @param bytes input byte array. * @return the char value. */ public static char[] toChars(byte[] bytes) { return toChars(bytes, 0, bytes.length); }
@Override public void deleteSchema() throws GoraException { throw new GoraException("delete schema is not supported for " + "file backed data stores"); }
/** * Reads the data written by {@link #writeNullFieldsInfo(DataOutput, Object...)} * and returns a boolean array representing whether each field is null or not. * * @param in the input to read from. * @return a boolean[] representing whether each field is null or not. * @throws IOException when value is too long to fit in integer. */ public static boolean[] readNullFieldsInfo(DataInput in) throws IOException { return readBoolArray(in); }
/** * Compare byte two byte arrays, and returns a int value accordingly. * * @param left left byte array to be considered. * @param right right byte array to be considered. * @return 0 if equal, {@literal <} 0 if left is less than right, etc. */ public static int compareTo(final byte [] left, final byte [] right) { return compareTo(left, 0, left.length, right, 0, right.length); }
/** * Converts a byte array to a short value. * * @param bytes input byte array. * @param offset offset position of input array. * @return the short value. */ public static short toShort(byte[] bytes, int offset) { return toShort(bytes, offset, SIZEOF_SHORT); }
/** * Presumes float encoded as IEEE 754 floating-point "single format". * * @param bytes offset to be considered from byte array. * @return Float made from passed byte array. */ public static float toFloat(byte [] bytes) { return toFloat(bytes, 0); }
/** * Converts byte array to a double value. * * @param bytes input byte array to be considered. * @return Return double made from passed bytes. */ public static double toDouble(final byte [] bytes) { return toDouble(bytes, 0); }
/** * Converts a byte array to a char value. * * @param bytes input bytes array. * @return the char value. */ public static char toChar(byte[] bytes) { return toChar(bytes, 0); }
/** * Converts a byte array to a long value. * * @param bytes input byte array. * @return the long value. */ public static long toLong(byte[] bytes) { return toLong(bytes, 0); }
@Override public void readFields(DataInput in) throws IOException { this.arr = IOUtils.readBoolArray(in); } @Override
@Override /** * Deletes schema from the data store */ public void deleteSchema() throws GoraException { throw new OperationNotSupportedException("delete schema is not supported for " + "file backed data stores"); }
/** * Converts a byte array to an int value. * * @param bytes input byte array. * @param offset input byte array offset. * @return the int value. */ public static int toInt(byte[] bytes, int offset) { return toInt(bytes, offset, SIZEOF_INT); }
/** * Converts a byte array to a char array value. * * @param bytes input byte array. * @param offset offset to be considered from input array. * @return the char value. */ public static char[] toChars(byte[] bytes, int offset) { return toChars(bytes, offset, bytes.length-offset); }
/** * Compare byte two byte arrays, and returns a int value accordingly. * * @param left left byte array to be considered. * @param right right byte array to be considered. * @return 0 if equal, {@literal <} 0 if left is less than right, etc. */ public static int compareTo(final byte [] left, final byte [] right) { return compareTo(left, 0, left.length, right, 0, right.length); }
/** * Converts a byte array to a short value. * * @param bytes input byte array. * @return the short value. */ public static short toShort(byte[] bytes) { return toShort(bytes, 0); }
/** * Executes a PartitialQuery, reading the data between start and end. */ @Override protected Result<K,T> executePartial(FileSplitPartitionQuery<K,T> query) throws IOException { throw new OperationNotSupportedException("Not yet implemented"); }
/** * Converts a byte array to an int value. * * @param bytes input byte array. * @param offset input byte array offset. * @return the int value. */ public static int toInt(byte[] bytes, int offset) { return toInt(bytes, offset, SIZEOF_INT); }
@Override public T get(K key, String[] fields) throws GoraException { throw new OperationNotSupportedException( "Avro DataFile's does not support indexed retrieval"); }