use of com.sap.hadoop.ds.BaseException in project SQLWindowing by hbutani.
the class Utils method createLazySimpleSerDe.
public static LazySimpleSerDe createLazySimpleSerDe(String columns, String types, String fieldDelim) throws BaseException {
try {
Properties p = new Properties();
p.put(Constants.FIELD_DELIM, fieldDelim);
p.put(Constants.LIST_COLUMNS, columns);
p.put(Constants.LIST_COLUMN_TYPES, types);
LazySimpleSerDe sd = new LazySimpleSerDe();
sd.initialize(null, p);
return sd;
} catch (SerDeException se) {
throw new BaseException(se);
}
}
use of com.sap.hadoop.ds.BaseException in project SQLWindowing by hbutani.
the class ByteBasedList method get.
public void get(int i, Writable wObj) throws BaseException {
LockUtils.lock(lock.readLock());
try {
i = index(i);
DataIStream dis = Streams.dis.get();
ByteArrayIS bis = dis.getUnderlyingStream();
bis.setBuffer(bytes, offsetsArray[i], offsetsArray[i + 1]);
wObj.readFields(dis);
} catch (IOException ie) {
throw new BaseException(ie);
} finally {
lock.readLock().unlock();
}
}
Aggregations