/** * Get the values of the fields as an ArrayList. * @return The values of the fields as an ArrayList. */ @Override public ArrayList<Object> getFieldsAsList() { if (!getParsed()) { parse(); } if (cachedList == null) { cachedList = new ArrayList<Object>(); } else { cachedList.clear(); } for (int i = 0; i < getFields().length; i++) { cachedList.add(uncheckedGetField(i)); } return cachedList; }
/** * Get one field out of the HBase row. * * If the field is a primitive field, return the actual object. * Otherwise return the LazyObject. This is because PrimitiveObjectInspector * does not have control over the object used by the user - the user simply * directly uses the Object instead of going through * Object PrimitiveObjectInspector.get(Object). * * @param fieldID The field ID * @return The field as a LazyObject */ @Override public Object getField(int fieldID) { if (!getParsed()) { parse(); } return uncheckedGetField(fieldID); }