@ Override public synchronized void seek ( long pos ) throws IOException { long startTime = System . nanoTime ( ) ; logger . atFine ( ) . log ( "seek: %d" , pos ) ; try { channel . position ( pos ) ; } catch ( IllegalArgumentException e ) { throw new IOException ( e ) ; } long duration = System . nanoTime ( ) - startTime ; ghfs . increment ( GoogleHadoopFileSystemBase . Counter . SEEK ) ; ghfs . increment ( GoogleHadoopFileSystemBase . Counter . SEEK_TIME , duration ) ; }
Sets the current position within the file being read .