Search Java Code Snippets


  Help us in improving the repository. Add new snippets through 'Submit Code Snippet ' link.





Java - Code Samples

 Sample 1. Code Sample / Example / Snippet of org.apache.spark.sql.catalyst.expressions.UnsafeRow

        public UnsafeRow next() {

try {

sortedIterator.loadNext();

row.pointTo(

sortedIterator.getBaseObject(),

sortedIterator.getBaseOffset(),

numFields,

sortedIterator.getRecordLength());

if (!hasNext()) {

UnsafeRow copy = row.copy(); // so that we don't have dangling pointers to freed page

row = null; // so that we don't keep references to the base object

cleanupResources();

return copy;

} else {

return row;

}

} catch (IOException e) {

cleanupResources();

Platform.throwException(e);

}

throw new RuntimeException("Exception should have been re-thrown in next()");

};


   Like      Feedback      org.apache.spark.sql.catalyst.expressions.UnsafeRow



Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner