force bakes the given translog generation as recovery information in the lucene index this is used when recovering from a snapshot or peer file based recovery where a new empty translog is created and the existing lucene index needs should be changed to use it

public void associate index with new translog ( final string translog u u i d ) throws i o exception { metadata lock write lock ( ) lock ( ) ; try ( index writer writer = new appending index writer ( directory , null ) ) { if ( translog u u i d equals ( get user data ( writer ) get ( translog translog uuid key ) ) ) { throw new illegal argument exception ( " a new translog uuid can ' t be equal to existing one got [ " + translog u u i d + " ] " ) ; } update commit data ( writer , map of ( translog translog uuid key , translog u u i d ) ) ; } finally { metadata lock write lock ( ) unlock ( ) ; } }


gets the setting indicating if values of operand constants that differ are currently being ignored when determining code unit differences

public boolean is ignoring constants ( ) { return ignore constants ; }


do io reads , writes , connection establishment , etc

void poll ( long timeout ) throws i o exception ;


public logout response new logout response ( final string id , final string destination , final issuer issuer , final status status , final string recipient ) { val logout response = new saml object ( logout response class ) ; logout response set issuer ( issuer ) ; logout response set issue instant ( instant now ( clock system u t c ( ) ) ) ; logout response set i d ( id ) ; logout response set destination ( destination ) ; logout response set in response to ( recipient ) ; logout response set status ( status ) ; logout response set version ( s a m l version version 20 ) ; return logout response ; }


returns a { @ code char sequence } of the subsequence from the { @ code start } index to the { @ code end } index

public char sequence sub sequence ( int start , int end ) { return substring ( start , end ) ; }


serialize this { @ link correlation context } to a { @ link string }

string serialize ( ) { if ( data is empty ( ) ) { return " " ; } return data entry set ( ) stream ( ) map ( entry - > base 6 4 encode ( entry get key ( ) ) + " : " + base 6 4 encode ( entry get value ( ) ) ) collect ( collectors joining ( " , " ) ) ; }


accepts an element visitor invokes the visitor method specific to this element ' s type

< t > t accept visitor ( element visitor < t > visitor ) ;


invoked when reactive streams consumer signals demand

public void request ( long n ) { try read ( ) ; }


check if an exception is isolated to a single stream or the entire connection

public static boolean is stream error ( http 2 exception e ) { return e instanceof stream exception ; }


visit a parse tree produced by { @ link sql base parser # expression }

t visit expression ( sql base parser expression context ctx ) ;


read an unsigned integer from the given position without modifying the buffers position

public static long read unsigned int ( byte buffer buffer , int index ) { return buffer get int ( index ) & 0xffffffff l ; }


allows determining the " data " property without the need to load plugins , but does this purely based on naming conventions prefer using { @ link # is data node ( settings ) } if possible

public static boolean is data node based on naming convention ( final settings settings ) { return discovery node has role ( settings , discovery node role data role ) | | settings get as list ( " node roles " ) stream ( ) any match ( discovery node role : : is data role based on naming convention ) ; }


public static void put ( @ non null final string key , final bitmap value , final int save time ) { put ( key , value , save time , get default cache disk utils ( ) ) ; }


wrap the given connection with a proxy that delegates every method call to it but delegates { @ code close } calls to connection factory utils

protected connection get transaction aware connection proxy ( connection target , connection factory cf ) { return ( connection ) proxy new proxy instance ( connection class get class loader ( ) , new class < ? > [ ] { connection class } , new transaction aware invocation handler ( target , cf ) ) ; }


set the config locations for this application context if not set , the implementation may use a default as appropriate

public void set config locations ( @ nullable string locations ) { if ( locations ! = null ) { assert no null elements ( locations , " config locations must not be null " ) ; this config locations = new string [ locations length ] ; for ( int i = 0 ; i < locations length ; i + + ) { this config locations [ i ] = resolve path ( locations [ i ] ) trim ( ) ; } } else { this config locations = null ; } }


creates a new tsi handshaker for use by the client

public static tsi handshaker new client ( handshaker service stub stub , alts handshaker options options ) { return new alts tsi handshaker ( true , stub , options ) ; }


get the list of pending uploads for this job attempt

protected active commit list pending uploads ( job context context , boolean suppress exceptions ) throws i o exception { try ( duration info ignored = new duration info ( log , " listing pending uploads " ) ) { path wrapped job attempt path = get job attempt path ( context ) ; final file system attempt f s = wrapped job attempt path get file system ( context get configuration ( ) ) ; return active commit from status list ( attempt f s , list and filter ( attempt f s , wrapped job attempt path , false , hidden file filter ) ) ; } catch ( file not found exception e ) { / / this can mean the job was aborted early on , so don ' t confuse people / / with long stack traces that aren ' t the underlying problem maybe ignore ( suppress exceptions , " pending upload directory not found " , e ) ; } catch ( i o exception e ) { / / unable to work with endpoint , if suppressing errors decide our actions maybe ignore ( suppress exceptions , " listing pending uploads " , e ) ; } / / reached iff an ioe was caught and swallowed return active commit empty ( ) ; }


the set of values defined for this entry , each corresponding to a different configurationvariant < code > repeated aapt pb config value config value = 4 ; < code >

private void add config value ( int index , com android aapt resources config value value ) { if ( value = = null ) { throw new null pointer exception ( ) ; } ensure config value is mutable ( ) ; config value add ( index , value ) ; }


determine if the { @ code bean name } is the name of a bean that references the target bean within a scoped proxy

public static boolean is scoped target ( @ nullable string bean name ) { return ( bean name ! = null & & bean name starts with ( target name prefix ) ) ; }


provide a custom type - level request condition the custom { @ link request condition } can be of any type so long as the same condition type is returned from all calls to this method in order to ensure custom request conditions can be combined and compared consider extending { @ link abstract request condition } for custom condition types and using { @ link composite request condition } to provide multiple custom conditions

protected request condition < ? > get custom type condition ( class < ? > handler type ) { return null ; }


verify whether quota usage cache in router quota manager is updated properly { @ link router quota update service # periodic invoke ( ) } should be able to update the cache even if the destination directory for some mount entry is not present in the filesystem

public void test quota refresh when destination not present ( ) throws exception { long ns quota = 5 ; long ss quota = 3 * block size ; final file system nn fs = nn context 1 get file system ( ) ; / / add three mount tables : / / / setdir 1 - - > ns 0 - - - testdir 1 3 / / / setdir 2 - - > ns 0 - - - testdir 1 4 / / create destination directory nn fs mkdirs ( new path ( " / testdir 1 3 " ) ) ; nn fs mkdirs ( new path ( " / testdir 1 4 " ) ) ; mount table mount table = mount table new instance ( " / setdir 1 " , collections singleton map ( " ns 0 " , " / testdir 1 3 " ) ) ; mount table set quota ( new router quota usage builder ( ) quota ( ns quota ) space quota ( ss quota ) build ( ) ) ; add mount table ( mount table ) ; mount table = mount table new instance ( " / setdir 2 " , collections singleton map ( " ns 0 " , " / testdir 1 4 " ) ) ; mount table set quota ( new router quota usage builder ( ) quota ( ns quota ) space quota ( ss quota ) build ( ) ) ; add mount table ( mount table ) ; final d f s client router client = router context get client ( ) ; / / create file router client create ( " / setdir 1 / file 1 " , true ) close ( ) ; router client create ( " / setdir 2 / file 2 " , true ) close ( ) ; / / append data to the file append data ( " / setdir 1 / file 1 " , router client , block size ) ; append data ( " / setdir 2 / file 2 " , router client , block size ) ; router quota update service update service = router context get router ( ) get quota cache update service ( ) ; / / update quota cache update service periodic invoke ( ) ; / / reload the router cache resolver load cache ( true ) ; client protocol client 1 = nn context 1 get client ( ) get namenode ( ) ; router quota manager quota manager = router context get router ( ) get quota manager ( ) ; quota usage quota 1 = client 1 get quota usage ( " / testdir 1 3 " ) ; quota usage quota 2 = client 1 get quota usage ( " / testdir 1 4 " ) ; quota usage cache quota 1 = quota manager get quota usage ( " / setdir 1 " ) ; quota usage cache quota 2 = quota manager get quota usage ( " / setdir 2 " ) ; / / get quota details in mount table mount table updated mount table = get mount table ( " / setdir 1 " ) ; router quota usage mount quota 1 = updated mount table get quota ( ) ; updated mount table = get mount table ( " / setdir 2 " ) ; router quota usage mount quota 2 = updated mount table get quota ( ) ; / / verify quota usage assert equals ( 2 , quota 1 get file and directory count ( ) ) ; assert equals ( 2 , cache quota 1 get file and directory count ( ) ) ; assert equals ( 2 , mount quota 1 get file and directory count ( ) ) ; assert equals ( 2 , quota 2 get file and directory count ( ) ) ; assert equals ( 2 , cache quota 2 get file and directory count ( ) ) ; assert equals ( 2 , mount quota 2 get file and directory count ( ) ) ; assert equals ( block size , quota 1 get space consumed ( ) ) ; assert equals ( block size , cache quota 1 get space consumed ( ) ) ; assert equals ( block size , mount quota 1 get space consumed ( ) ) ; assert equals ( block size , quota 2 get space consumed ( ) ) ; assert equals ( block size , cache quota 2 get space consumed ( ) ) ; assert equals ( block size , mount quota 2 get space consumed ( ) ) ; file system router fs = router context get file system ( ) ; / / remove file in setdir 1 the target directory still exists router fs delete ( new path ( " / setdir 1 / file 1 " ) , true ) ; / / create file router client create ( " / setdir 2 / file 3 " , true ) close ( ) ; / / append data to the file append data ( " / setdir 2 / file 3 " , router client , block size ) ; int updated space = block size + block size ; / / update quota cache update service periodic invoke ( ) ; quota 2 = client 1 get quota usage ( " / testdir 1 4 " ) ; cache quota 1 = quota manager get quota usage ( " / setdir 1 " ) ; cache quota 2 = quota manager get quota usage ( " / setdir 2 " ) ; / / get quota details in mount table updated mount table = get mount table ( " / setdir 1 " ) ; mount quota 1 = updated mount table get quota ( ) ; updated mount table = get mount table ( " / setdir 2 " ) ; mount quota 2 = updated mount table get quota ( ) ; / / the quota usage should be reset assert equals ( 1 , cache quota 1 get file and directory count ( ) ) ; assert equals ( 1 , mount quota 1 get file and directory count ( ) ) ; assert equals ( 0 , cache quota 1 get space consumed ( ) ) ; assert equals ( 0 , mount quota 1 get space consumed ( ) ) ; / / verify current quota usage for other mount entries assert equals ( 3 , quota 2 get file and directory count ( ) ) ; assert equals ( 3 , cache quota 2 get file and directory count ( ) ) ; assert equals ( 3 , mount quota 2 get file and directory count ( ) ) ; assert equals ( updated space , quota 2 get space consumed ( ) ) ; assert equals ( updated space , cache quota 2 get space consumed ( ) ) ; assert equals ( updated space , mount quota 2 get space consumed ( ) ) ; }


one - line plain text message that explains what this category is about this can be used in the ui to help the user pick the right category the text should be longer than { @ link # get display name ( ) }

public abstract string get short description ( ) ;


wait for a response from the debug server returns null if no response was received , or this thread was interrupted

private debug event wait for response ( long sequence ) { debug event response = null ; long start time = system current time millis ( ) ; synchronized ( responses ) { while ( response = = null & & should wait for response ( start time ) ) { try { responses wait ( 1000 ) ; } catch ( interrupted exception e ) { throw new assertion error ( e ) ; } response = responses remove ( sequence ) ; } } return response ; }


convert the given key to a case - insensitive key the default implementation converts the key to lower - case according to this map ' s locale

protected string convert key ( string key ) { return key to lower case ( get locale ( ) ) ; }


get the dynamo d b metastore ; assume false if it is of a different type

private dynamo d b metadata store get required d d b metastore ( s 3 a file system fs ) { metadata store ms = fs get metadata store ( ) ; assume ( " not a dynamo d b metadata store : " + ms , ms instanceof dynamo d b metadata store ) ; return ( dynamo d b metadata store ) ms ; }


adds this node as child to specified parent node , synonym for : < code > parent add child ( this ) < code >

public < t extends node > void attach to ( t parent ) { parent add child ( this ) ; }


returns true if the current single row selection corresponds to a flexible array component

public boolean is flexible array selection ( ) { if ( ! is single row selection ( ) ) { return false ; } field range range = selection get field range ( 0 ) ; int row index = range get start ( ) get index ( ) int value ( ) ; data type component component = get component ( row index ) ; return component ! = null & & component is flexible array component ( ) ; }


whether we ' re ignoring timing rules for features

public static boolean is demo mode ( ) { return demo mode ; }


test regular rm restartfailover , new rm should not count am failure towards the max - retry - account and should be able to re - launch the am

public void test r m restart or failover not counted for a m failures ( ) throws exception { get conf ( ) set boolean ( yarn configuration recovery enabled , true ) ; get conf ( ) set boolean ( yarn configuration rm work preserving recovery enabled , false ) ; get conf ( ) set ( yarn configuration rm store , memory r m state store class get name ( ) ) ; / / explicitly set max - am - retry count as 2 get conf ( ) set int ( yarn configuration rm am max attempts , 2 ) ; mock r m rm 1 = new mock r m ( get conf ( ) ) ; memory r m state store mem store = ( memory r m state store ) rm 1 get r m state store ( ) ; rm 1 start ( ) ; abstract yarn scheduler scheduler = ( abstract yarn scheduler ) rm 1 get resource scheduler ( ) ; mock n m nm 1 = new mock n m ( " 127 0 0 1 : 1234 " , 8000 , rm 1 get resource tracker service ( ) ) ; nm 1 register node ( ) ; r m app app 1 = mock r m app submitter submit with memory ( 200 , rm 1 ) ; / / am should be restarted even though max - am - attempt is 1 mock a m am 1 = mock r m launch and register a m ( app 1 , rm 1 , nm 1 ) ; r m app attempt attempt 1 = app 1 get current app attempt ( ) ; / / fail the am normally nm 1 node heartbeat ( am 1 get application attempt id ( ) , 1 , container state complete ) ; rm 1 wait for state ( am 1 get application attempt id ( ) , r m app attempt state failed ) ; test scheduler utils wait scheduler application attempt stopped ( scheduler , am 1 get application attempt id ( ) ) ; assert assert true ( attempt 1 should count towards max attempt retry ( ) ) ; / / wait for the next am to start rm 1 wait for state ( app 1 get application id ( ) , r m app state accepted ) ; mock a m am 2 = rm 1 wait for new a m to launch and register ( app 1 get application id ( ) , 2 , nm 1 ) ; r m app attempt attempt 2 = app 1 get current app attempt ( ) ; / / restart rm mock r m rm 2 = new mock r m ( get conf ( ) , mem store ) ; rm 2 start ( ) ; application state data app state = mem store get state ( ) get application state ( ) get ( app 1 get application id ( ) ) ; / / re - register the nm nm 1 set resource tracker service ( rm 2 get resource tracker service ( ) ) ; n m container status status = records new record ( n m container status class ) ; status set container exit status ( container exit status killed by resourcemanager ) ; status set container id ( attempt 2 get master container ( ) get id ( ) ) ; status set container state ( container state complete ) ; status set diagnostics ( " " ) ; nm 1 register node ( collections singleton list ( status ) , null ) ; rm 2 wait for state ( attempt 2 get app attempt id ( ) , r m app attempt state failed ) ; assert assert equals ( container exit status killed by resourcemanager , app state get attempt ( am 2 get application attempt id ( ) ) get a m container exit status ( ) ) ; / / will automatically start a new app attempt in rm 2 rm 2 wait for state ( app 1 get application id ( ) , r m app state accepted ) ; mock a m am 3 = rm 2 wait for new a m to launch and register ( app 1 get application id ( ) , 3 , nm 1 ) ; mock r m finish a m and verify app state ( app 1 , rm 2 , nm 1 , am 3 ) ; r m app attempt attempt 3 = rm 2 get r m context ( ) get r m apps ( ) get ( app 1 get application id ( ) ) get current app attempt ( ) ; assert assert true ( attempt 3 should count towards max attempt retry ( ) ) ; assert assert equals ( container exit status invalid , app state get attempt ( am 3 get application attempt id ( ) ) get a m container exit status ( ) ) ; rm 1 stop ( ) ; rm 2 stop ( ) ; }


builds a { @ link java compilation args provider }

public java compilation args provider build ( ) { if ( runtime jars builder is empty ( ) & & direct compile time jars builder is empty ( ) & & transitive compile time jars builder is empty ( ) & & direct full compile time jars builder is empty ( ) & & transitive full compile time jars builder is empty ( ) & & compile time java dependency artifacts builder is empty ( ) ) { return empty ; } return create ( runtime jars builder build ( ) , direct compile time jars builder build ( ) , transitive compile time jars builder build ( ) , direct full compile time jars builder build ( ) , transitive full compile time jars builder build ( ) , compile time java dependency artifacts builder build ( ) ) ; }


puts a keyvalue pair into the array , optimizing for the case where the key is greater than all existing keys in the array

public void append ( int key , int value ) { if ( m size ! = 0 & & key < = m keys [ m size - 1 ] ) { put ( key , value ) ; return ; } m keys = append element into int array ( m keys , m size , key ) ; m values = append element into int array ( m values , m size , value ) ; m size + + ; }


sets the gap policy to use for this aggregation

public bucket selector pipeline aggregation builder gap policy ( gap policy gap policy ) { if ( gap policy = = null ) { throw new illegal argument exception ( " [ gap policy ] must not be null : [ " + name + " ] " ) ; } this gap policy = gap policy ; return this ; }


sets the name of the ship strategy for the represented input

public void set ship strategy name ( string ship strategy name ) { this ship strategy name = ship strategy name ; }


public static < t extends vector < t > > t cubic derivative ( final t out , final float t , final t p 0 , final t p 1 , final t p 2 , final t p 3 , final t tmp ) { / / b3 ' ( t ) = 3 * ( 1 - t ) * ( 1 - t ) * ( p 1 - p 0 ) + 6 * ( 1 - t ) * t * ( p 2 - p 1 ) + 3 * t * t * ( p 3 - p 2 ) final float dt = 1f - t ; final float dt 2 = dt * dt ; final float t 2 = t * t ; return out set ( p 1 ) sub ( p 0 ) scl ( dt 2 * 3 ) add ( tmp set ( p 2 ) sub ( p 1 ) scl ( dt * t * 6 ) ) add ( tmp set ( p 3 ) sub ( p 2 ) scl ( t 2 * 3 ) ) ; }


if resources exist and a data binding layout info file is requested : processes data binding declarations over those resources , populates the output file , and creates a new resources directory with data binding expressions stripped out ( so aapt , which doesn ' t understand data binding , can properly read them ) returns the resources directory that aapt should read

static path process data bindings ( path processed resource output directory , path input resources dir , path data binding info out , string package path , boolean should zip data binding info , boolean use data binding android x ) throws i o exception { if ( data binding info out = = null ) { return input resources dir ; } else if ( ! files is directory ( input resources dir ) ) { / / no resources : no data binding needed create a dummy file to satisfy declared outputs files create file ( data binding info out ) ; return input resources dir ; } / / strip the file name ( the data binding library automatically adds it back in ) / / * * the data binding library assumes this file is called " layout - info zip " * * if ( should zip data binding info ) { data binding info out = data binding info out get parent ( ) ; if ( files not exists ( data binding info out ) ) { files create directory ( data binding info out ) ; } } / / create a directory for the resources , namespaced with the old resource path path processed resource dir = files create directories ( processed resource output directory resolve ( input resources dir is absolute ( ) ? input resources dir get root ( ) relativize ( input resources dir ) : input resources dir ) ) ; process xml options options = new process xml options ( ) ; options set app id ( package path ) ; options set res input ( input resources dir to file ( ) ) ; options set res output ( processed resource dir to file ( ) ) ; options set layout info output ( data binding info out to file ( ) ) ; options set use android x ( use data binding android x ) ; / / whether or not to aggregate data - bound xml files into a single zip options set zip layout info ( should zip data binding info ) ; try { android data binding do run ( options ) ; } catch ( throwable t ) { throw new runtime exception ( t ) ; } return processed resource dir ; }


public http response do hide upgrade wizard ( ) { jenkins get ( ) check permission ( jenkins administer ) ; http session session = stapler get current request ( ) get session ( false ) ; if ( session ! = null ) { session remove attribute ( show upgrade wizard flag ) ; } return http responses redirect to context root ( ) ; }


removes a range of { @ link media source } s from the playlist , by specifying an initial index ( included ) and a final index ( excluded ) , and executes a custom action on completion note : when specified range is empty , no actual media source is removed and no exception is thrown

public synchronized void remove media source range ( int from index , int to index , handler handler , runnable on completion action ) { remove public media sources ( from index , to index , handler , on completion action ) ; }


hook method called by the blaze command dispatcher after the dispatch of each command returns a new exit code in case exceptions were encountered during cleanup

public blaze command result after command ( command environment env , blaze command result command result ) { / / remove any filters that the command might have added to the reporter env get reporter ( ) set output filter ( output filter output everything ) ; blaze command result after command result = null ; for ( blaze module module : blaze modules ) { try ( silent closeable c = profiler instance ( ) profile ( module + " after command " ) ) { module after command ( ) ; } catch ( abrupt exit exception e ) { env get reporter ( ) handle ( event error ( e get message ( ) ) ) ; / / it ' s not ideal but we can only return one exit code , so we just pick the code of the / / last exception after command result = blaze command result detailed exit code ( e get detailed exit code ( ) ) ; } } env get event bus ( ) post ( new after command event ( ) ) ; / / wipe the dependency graph if requested note that this method always runs at the end of / / a commands unless the server crashes , in which case no inmemory state will linger for the / / next build anyway common command options common options = preconditions check not null ( env get options ( ) get options ( common command options class ) ) ; if ( ! common options keep state after build ) { workspace get skyframe executor ( ) reset evaluator ( ) ; } / / build - related commands already call this hook in build tool # stop request , but non - build / / commands might also need to notify the skyframe executor it ' s called in # stop request so that / / timing metrics for builds can be more accurate ( since this call can be slow ) try { workspace get skyframe executor ( ) notify command complete ( env get reporter ( ) ) ; } catch ( interrupted exception e ) { logger at info ( ) with cause ( e ) log ( " interrupted in after command " ) ; after command result = blaze command result detailed exit code ( interrupted failure details detailed exit code ( " executor completion interrupted " ) ) ; thread current thread ( ) interrupt ( ) ; } blaze command result final command result ; if ( ! command result get exit code ( ) is infrastructure failure ( ) & & after command result ! = null ) { final command result = after command result ; } else { final command result = command result ; } detailed exit code other thread won exit code = notify command complete ( final command result get detailed exit code ( ) ) ; if ( other thread won exit code ! = null ) { final command result = blaze command result detailed exit code ( other thread won exit code ) ; } env get blaze workspace ( ) clear event bus ( ) ; for ( blaze module module : blaze modules ) { try ( silent closeable closeable = profiler instance ( ) profile ( module + " command complete " ) ) { module command complete ( ) ; } } env get reporter ( ) clear event bus ( ) ; retained heap limiter reset event handler ( ) ; action key context clear ( ) ; debug logger configurator flush server log ( ) ; stored exit code set ( null ) ; return final command result ; }


public void test outer composite ( ) { / / todo : test outer composite }


< code > repeated io netty example worldclock location location = 1 ; < code >

public java util list < ? extends io netty example worldclock world clock protocol location or builder > get location or builder list ( ) { return location ; }


invalidates a collection of access token and refresh token that were retrieved by { @ link token service # invalidate active tokens for realm and user }

private void invalidate all tokens ( collection < user token > user tokens , action listener < tokens invalidation result > listener ) { maybe start token remover ( ) ; / / invalidate the refresh tokens first so that they cannot be used to get new / / access tokens while we invalidate the access tokens we currently know about final iterator < time value > backoff = default backoff iterator ( ) ; index invalidation ( user tokens , backoff , " refresh token " , null , action listener wrap ( result - > index invalidation ( user tokens , backoff , " access token " , result , listener ) , listener : : on failure ) ) ; }


attempt calling overridden { @ link # do call ( path ) } method with specified { @ link file system } and { @ link path } if the call fails with an unresolved link exception , it will try to resolve the path and retry the call by calling { @ link # next ( file system , path ) }

public t resolve ( final file system filesys , final path path ) throws i o exception { int count = 0 ; t in = null ; path p = path ; / / assumes path belongs to this file system / / callers validate this by passing paths through file system # check path file system fs = filesys ; for ( boolean is link = true ; is link ; ) { try { in = do call ( p ) ; is link = false ; } catch ( unresolved link exception e ) { if ( ! filesys resolve symlinks ) { throw new i o exception ( " path " + path + " contains a symlink " + " and symlink resolution is disabled ( " + common configuration keys fs client resolve remote symlinks key + " ) " , e ) ; } if ( ! file system are symlinks enabled ( ) ) { throw new i o exception ( " symlink resolution is disabled in " + " this version of hadoop " ) ; } if ( count + + > fs constants max path links ) { throw new i o exception ( " possible cyclic loop while " + " following symbolic link " + path ) ; } / / resolve the first unresolved path component p = f s link resolver qualify symlink target ( fs get uri ( ) , p , filesys resolve link ( p ) ) ; fs = file system get f sof path ( p , filesys get conf ( ) ) ; / / have to call next if it ' s a new fs if ( ! fs equals ( filesys ) ) { return next ( fs , p ) ; } / / else , we keep resolving with this filesystem } } / / successful call , path was fully resolved return in ; }


returns the libc version string ( e g " glibc - 2 2 2 " )

public string get target libc ( ) { return target libc ; }


returns a future that finishes when this step does calling { @ code get ( ) } on the returned future returns { @ code null } if the step is successful or throws the same exception that would be thrown by calling { @ code finish to future ( ) get ( ) } if this were the last step calling { @ code cancel ( ) } on the returned future has no effect on the { @ code closing future } pipeline { @ code status future } differs from most methods on { @ code closing future } : you can make calls to { @ code status future } in addition to the call you make to { @ link # finish to future ( ) } or a derivation method on the same instance this is important because calling { @ code status future } alone does not provide a way to close the pipeline

public listenable future < ? > status future ( ) { return non cancellation propagating ( future transform ( constant ( null ) , direct executor ( ) ) ) ; }


gets an instance of { @ link decimal data } from underlying { @ link memory segment }

public static decimal data read decimal data ( memory segment [ ] segments , int base offset , long offset and size , int precision , int scale ) { final int size = ( ( int ) offset and size ) ; int sub offset = ( int ) ( offset and size > > 32 ) ; byte [ ] bytes = new byte [ size ] ; copy to bytes ( segments , base offset + sub offset , bytes , 0 , size ) ; return decimal data from unscaled bytes ( bytes , precision , scale ) ; }


returns the mean time spent actively waiting for playback per foreground playback , in milliseconds , or { @ link c # time unset } if no playback has been in foreground this includes all join times , rebuffer times and seek times , but excludes times without user intention to play , e g all paused states

public long get mean wait time ms ( ) { return foreground playback count = = 0 ? c time unset : get total wait time ms ( ) / foreground playback count ; }


creates an { @ link elasticsearch security exception } that indicates the request contained an invalid grant

private static elasticsearch security exception invalid grant exception ( string detail ) { elasticsearch security exception e = new elasticsearch security exception ( " invalid grant " , rest status bad request ) ; e add header ( " error description " , detail ) ; return e ; }


register the specified bean as dependent on the autowired beans

private void register dependent beans ( @ nullable string bean name , set < string > autowired bean names ) { if ( bean name ! = null ) { for ( string autowired bean name : autowired bean names ) { if ( this bean factory ! = null & & this bean factory contains bean ( autowired bean name ) ) { this bean factory register dependent bean ( autowired bean name , bean name ) ; } if ( logger is trace enabled ( ) ) { logger trace ( " autowiring by type from bean name ' " + bean name + " ' to bean named ' " + autowired bean name + " ' " ) ; } } } }


construct and return a map from a high symbol ' s name to the high symbol object

public map < string , high symbol > get name to symbol map ( ) { map < string , high symbol > new map = new tree map < string , high symbol > ( ) ; for ( high symbol high symbol : symbol map values ( ) ) { new map put ( high symbol get name ( ) , high symbol ) ; } return new map ; }


adds the map to the provided map under the provided field name if it ' s should be included

public map builder add ( string field name , boolean include , @ nullable map < string , ? > map value ) { if ( include & & map value ! = null & & ! map value is empty ( ) ) { map put ( get field name ( field name ) , map value ) ; } return this ; }


return the configured header initializer

public message header initializer get header initializer ( ) { return this header initializer ; }


convert the given object to string with each line indented by 4 spaces ( except the first line )

private string to indented string ( object o ) { if ( o = = null ) { return " null " ; } return o to string ( ) replace ( " \ n " , " \ n " ) ; }


test that interrupting a thread in an " interruptible " command execute does terminate the subprocess and throws an { @ link interrupted exception }

public void interruptible command is interrupted ( ) throws command exception { assume true ( os get current ( ) ! = os windows ) ; future command result result = command execute async ( ) ; assert throws ( interrupted exception class , result : : get ) ; assert that ( files exists ( tmp dir resolve ( " endfile " ) ) ) is false ( ) ; assert that ( result is done ( ) ) is true ( ) ; }


returns true if the entity class can be updated , e g for setting the pk after insert

abstract protected boolean is entity updateable ( ) ;


synchronous observable and semaphore isolation only [ main ] thread is involved in this

public void test short circuited with fallback request context with semaphore isolated synchronous observable ( ) { request context test results results = test request context on short circuited with fallback ( execution isolation strategy semaphore , schedulers immediate ( ) ) ; assert true ( results is context initialized get ( ) ) ; assert true ( results origin thread get ( ) equals ( thread current thread ( ) ) ) ; / / all synchronous assert true ( results is context initialized observe on get ( ) ) ; assert true ( results observe on thread get ( ) equals ( thread current thread ( ) ) ) ; / / all synchronous / / semaphore isolated assert false ( results command is executed in thread ( ) ) ; }


subclasses should override this method if it is interested when a program is closed this event has no affect on the " current program " a " program deactivated " call will occur that affects the active program

protected void program closed ( program program ) { }


sets the doc to use for updates when a script is not specified

public update request doc ( byte [ ] source , x content type x content type ) { safe doc ( ) source ( source , x content type ) ; return this ; }


it requires setting a job jar to build a { @ link packaged program } , and the dummy job jar used in this test case is available only after the packaging phase completed , so we make it as an i t case

public void test configure python execution ( ) throws illegal access exception , no such field exception , cli args exception , program invocation exception , i o exception { final string [ ] args = { " - - python " , " xxx py " , " - - py module " , " xxx " , " - - py files " , " / absolute / a py , relative / b py , relative / c py " , " - - py requirements " , " d txt # e dir " , " - - py executable " , " / usr / bin / python " , " - - py archives " , " g zip , h zip # data , h zip # data 2 " , " userarg 1 " , " userarg 2 " } ; final file [ ] dummy job jar = { null } ; files walk file tree ( file systems get default ( ) get path ( system get property ( " user dir " ) + " / dummy - job - jar " ) , new simple file visitor < path > ( ) { @ override public file visit result visit file ( path file , basic file attributes attrs ) throws i o exception { file visit result result = super visit file ( file , attrs ) ; if ( file get file name ( ) to string ( ) starts with ( " flink - python " ) ) { dummy job jar [ 0 ] = file to file ( ) ; } return result ; } } ) ; packaged program packaged program = packaged program new builder ( ) set arguments ( args ) set jar file ( dummy job jar [ 0 ] ) build ( ) ; configuration configuration = new configuration ( ) ; program options utils configure python execution ( configuration , packaged program ) ; assert equals ( " / absolute / a py , relative / b py , relative / c py " , configuration get ( python options python files ) ) ; assert equals ( " d txt # e dir " , configuration get ( python requirements ) ) ; assert equals ( " g zip , h zip # data , h zip # data 2 " , configuration get ( python options python archives ) ) ; assert equals ( " / usr / bin / python " , configuration get ( python executable ) ) ; assert array equals ( new string [ ] { " - - python " , " xxx py " , " - - py module " , " xxx " , " userarg 1 " , " userarg 2 " } , packaged program get arguments ( ) ) ; }


public void bool item test ( ) { / / todo : test bool item }


public void message test ( ) { / / todo : test message }


public void test model api response ( ) { / / todo : test model api response }


returns whether a { @ link drm session } may require a secure decoder for a given { @ link format }

private boolean maybe requires secure decoder ( drm session drm session , format format ) throws exo playback exception { / / media crypto type is checked during track selection @ nullable framework media crypto session media crypto = get framework media crypto ( drm session ) ; if ( session media crypto = = null ) { / / we ' d only expect this to happen if the cdm from which the pending session is obtained needs / / provisioning this is unlikely to happen ( it probably requires a switch from one drm scheme / / to another , where the new cdm hasn ' t been used before and needs provisioning ) assume that / / a secure decoder may be required return true ; } if ( session media crypto force allow insecure decoder components ) { return false ; } media crypto media crypto ; try { media crypto = new media crypto ( session media crypto uuid , session media crypto session id ) ; } catch ( media crypto exception e ) { / / this shouldn ' t happen , but if it does then assume that a secure decoder may be required return true ; } try { return media crypto requires secure decoder component ( format sample mime type ) ; } finally { media crypto release ( ) ; } }


gets the current { @ link component tree } ; creates a new instance if { @ code null }

public component tree get component tree ( ) { if ( m component tree = = null ) { m component tree = component tree create ( m context ) build ( ) ; } return m component tree ; }


public string get name ( ) { return name ; }


parses the given string as an expression , and asserts that its { @ code to string } matches the given string

private static void assert expr tostring matches ( string source , string expected ) throws syntax error exception { expression node = parse expression ( source ) ; assert that ( node to string ( ) ) is equal to ( expected ) ; }


private object apply conversion ( @ nullable object value , named value info named value info , method parameter parameter , binding context binding context , server web exchange exchange ) { web data binder binder = binding context create data binder ( exchange , named value info name ) ; try { value = binder convert if necessary ( value , parameter get parameter type ( ) , parameter ) ; } catch ( conversion not supported exception ex ) { throw new server error exception ( " conversion not supported " , parameter , ex ) ; } catch ( type mismatch exception ex ) { throw new server web input exception ( " type mismatch " , parameter , ex ) ; } return value ; }


returns true if field success is set ( has been assigned a value ) and false otherwise

public boolean is set success ( ) { return this success ! = null ; }


tries to assign the given payload to this allocated slot this only works if there has not been another payload assigned to this slot

boolean try assign payload ( payload payload ) ;


when used in conjunction with { @ link flush job request # calc interim } , specifies the end of the range of buckets on which to calculate interim results

public void set end ( string end ) { this end = end ; }


returns the value nearest to { @ code value } which is within the closed range { @ code [ min max ] } if { @ code value } is within the range { @ code [ min max ] } , { @ code value } is returned unchanged if { @ code value } is less than { @ code min } , { @ code min } is returned , and if { @ code value } is greater than { @ code max } , { @ code max } is returned

public static char constrain to range ( char value , char min , char max ) { check argument ( min < = max , " min ( % s ) must be less than or equal to max ( % s ) " , min , max ) ; return value < min ? min : value < max ? value : max ; }


inserts the specified element into this priority queue

public boolean add ( e e ) { return offer ( e ) ; }


return the session attribute value if present

default < t > t get attribute ( string name ) { return ( t ) get attributes ( ) get ( name ) ; }


fully maps a file read - only in to memory as per { @ link file channel # map ( java nio channels file channel map mode , long , long ) } files are mapped from offset 0 to its length this only works for files ≤ { @ link integer # max value } bytes

public static mapped byte buffer map ( file file ) throws i o exception { check not null ( file ) ; return map ( file , map mode read only ) ; }


async observable and thread isolation user provided thread [ rx net thread ] executes observable and then [ rx computation ] observes the on next calls note : request context will not exist on that thread an async observable running on its own thread will not have access to the request context unless the user manages the context

public void test rejection with fallback request context with thread isolated asynchronous observable ( ) { request context test results results = test request context on rejection with fallback ( execution isolation strategy thread , schedulers new thread ( ) ) ; assert false ( results is context initialized get ( ) ) ; / / it won ' t have request context as it ' s on a user provided thread / scheduler assert true ( results origin thread get ( ) get name ( ) starts with ( " rx new thread " ) ) ; / / the user provided thread / scheduler assert true ( results is context initialized observe on get ( ) ) ; / / we capture and set the context once the user provided observable emits assert true ( results observe on thread get ( ) get name ( ) starts with ( " rx new thread " ) ) ; / / thread isolated , but rejected , so this is false assert false ( results command is executed in thread ( ) ) ; }


public boolean rename ( final path src , final path dst ) throws i o exception { long start time = system current time millis ( ) ; long thread id = thread current thread ( ) get id ( ) ; log debug ( " rename path { } to { } start " , src , dst ) ; try { if ( enable posix ) { return o b s posix bucket utils rename based on posix ( this , src , dst ) ; } else { return o b s object bucket utils rename based on object ( this , src , dst ) ; } } catch ( obs exception e ) { throw o b s common utils translate exception ( " rename ( " + src + " , " + dst + " ) " , src , e ) ; } catch ( rename failed exception e ) { log error ( e get message ( ) ) ; return e get exit code ( ) ; } catch ( file not found exception e ) { log error ( e to string ( ) ) ; return false ; } finally { long end time = system current time millis ( ) ; log debug ( " rename path { } to { } finished , thread : { } , " + " time used in milli sec : { } " , src , dst , thread id , end time - start time ) ; } }


takes an input set of argument values and converts them to the types specified as the required parameter types the arguments are converted ' in - place ' in the input array

static boolean convert arguments ( type converter converter , object [ ] arguments , executable executable , @ nullable integer varargs position ) throws evaluation exception { boolean conversion occurred = false ; if ( varargs position = = null ) { for ( int i = 0 ; i < arguments length ; i + + ) { type descriptor target type = new type descriptor ( method parameter for executable ( executable , i ) ) ; object argument = arguments [ i ] ; arguments [ i ] = converter convert value ( argument , type descriptor for object ( argument ) , target type ) ; conversion occurred | = ( argument ! = arguments [ i ] ) ; } } else { / / convert everything up to the varargs position for ( int i = 0 ; i < varargs position ; i + + ) { type descriptor target type = new type descriptor ( method parameter for executable ( executable , i ) ) ; object argument = arguments [ i ] ; arguments [ i ] = converter convert value ( argument , type descriptor for object ( argument ) , target type ) ; conversion occurred | = ( argument ! = arguments [ i ] ) ; } method parameter method param = method parameter for executable ( executable , varargs position ) ; if ( varargs position = = arguments length - 1 ) { / / if the target is varargs and there is just one more argument / / then convert it here type descriptor target type = new type descriptor ( method param ) ; object argument = arguments [ varargs position ] ; type descriptor source type = type descriptor for object ( argument ) ; arguments [ varargs position ] = converter convert value ( argument , source type , target type ) ; / / three outcomes of that previous line : / / 1 ) the input argument was already compatible ( ie array of valid type ) and nothing was done / / 2 ) the input argument was correct type but not in an array so it was made into an array / / 3 ) the input argument was the wrong type and got converted and put into an array if ( argument ! = arguments [ varargs position ] & & ! is first entry in array ( argument , arguments [ varargs position ] ) ) { conversion occurred = true ; / / case 3 } } else { / / convert remaining arguments to the varargs element type type descriptor target type = new type descriptor ( method param ) get element type descriptor ( ) ; assert state ( target type ! = null , " no element type " ) ; for ( int i = varargs position ; i < arguments length ; i + + ) { object argument = arguments [ i ] ; arguments [ i ] = converter convert value ( argument , type descriptor for object ( argument ) , target type ) ; conversion occurred | = ( argument ! = arguments [ i ] ) ; } } } return conversion occurred ; }


uninstall the app silently without root permission must hold { @ code android : shared user id = " android uid shell " } and { @ code < uses - permission android : name = " android permission delete packages " > }

public static boolean uninstall app silent ( final string package name ) { return uninstall app silent ( package name , false ) ; }


computes a new { @ link cache file } instance using the specified cache file information ( file length , file name , parent directory and already available cache ranges ) and associates it with the specified { @ link cache key } in the cache if the key is already associated with a { @ link cache file } , the previous instance is replaced by a new one this method can only be used before the { @ link cache service } is started

void put ( final cache key cache key , final long file length , final path cache dir , final string cache file uuid , final sorted set < tuple < long , long > > cache file ranges ) throws exception { ensure lifecycle initializing ( ) ; final path path = cache dir resolve ( cache file uuid ) ; if ( files exists ( path ) = = false ) { throw new file not found exception ( " cache file [ " + path + " ] not found " ) ; } final set once < cache file > cache file = new set once < > ( ) ; cache file set ( new cache file ( cache key , file length , path , cache file ranges , ( ) - > on cache file update ( cache file get ( ) ) ) ) ; cache put ( cache key , cache file get ( ) ) ; }


returns the dotd pruning plan for compiles in this build

public header discovery dotd pruning mode get dotd pruning plan ( ) { return dotd pruning plan ; }


public double get deviation ( ) { double variance = get variance ( ) ; return ( variance > 0 ) ? math sqrt ( variance ) : 0 ; }


public list < string > get children ( final string path ) throws exception { return curator get children ( ) for path ( path ) ; }


object evaluate ( evaluation context context ) throws exception ;


return the rating threshold above which ratings are considered to be " relevant " for this metric defaults to 1

public int get relevant rating threshold ( ) { return relevant rating threshold ; }


run sql as text using the { @ code format } parameter to specify the format rather than an { @ code accept } header

private tuple < string , string > run sql as text format ( string sql , string format ) throws i o exception { request request = new request ( " post " , sql query rest endpoint ) ; request add parameter ( " error trace " , " true " ) ; request add parameter ( " format " , format ) ; request set json entity ( query ( sql ) to string ( ) ) ; response response = client ( ) perform request ( request ) ; return new tuple < > ( streams copy to string ( new input stream reader ( response get entity ( ) get content ( ) , standard charsets utf 8 ) ) , response get header ( " cursor " ) ) ; }


convert the given object to string with each line indented by 4 spaces ( except the first line )

private string to indented string ( object o ) { if ( o = = null ) { return " null " ; } return o to string ( ) replace ( " \ n " , " \ n " ) ; }


return a map of the schemas defined under componentsschemas in the oas document the returned map only includes the direct children of componentsschemas in the oas document ; the map does not include inlined schemas

public static map < string , schema > get schemas ( open a p i open a p i ) { if ( open a p i ! = null & & open a p i get components ( ) ! = null & & open a p i get components ( ) get schemas ( ) ! = null ) { return open a p i get components ( ) get schemas ( ) ; } return collections empty map ( ) ; }


public synchronized boolean next ( text key , text value ) throws i o exception { text t key = key ; text t value = value ; if ( ! sequence file record reader next ( inner key , inner value ) ) { return false ; } t key set ( inner key to string ( ) ) ; t value set ( inner value to string ( ) ) ; return true ; }


retrieves the candidate users and groups associated with the task

set < identity link > get candidates ( ) ;


this is a convenience method for converting a class into structure the class is reflected to extract the field members only private non - static fields are considered any field names that start with underscore ( " " ) are ignored

public static data type to data type ( object object ) { return to data type ( object get class ( ) , object ) ; }


public void reset ( ) { set capacity ( 0 ) ; }


creates an empty place - holder { @ link plugin description } for the specified class

private static plugin description create default plugin description ( class < ? extends plugin > c ) { return new plugin description ( c , miscellaneous plugin package name , plugin category names unmanaged , null , null , plugin status unstable , false , collections empty list ( ) , collections empty list ( ) , collections empty list ( ) , collections empty list ( ) ) ; }


see original { @ link ongoing stubbing # get mock ( ) }


convert a protobuf token into a rpc token and set its service

public static < t extends token identifier > token < t > convert from yarn ( org apache hadoop yarn api records token proto token , text service ) { token < t > token = new token < t > ( proto token get identifier ( ) array ( ) , proto token get password ( ) array ( ) , new text ( proto token get kind ( ) ) , new text ( proto token get service ( ) ) ) ; if ( service ! = null ) { token set service ( service ) ; } return token ; }


public offset date time get date time ( ) { return date time ; }


sets the < code > string item < code > property

public type holder example string item ( string string item ) { this string item = string item ; return this ; }


set the { @ link message converter } strategy for converting jms messages

public void set message converter ( @ nullable message converter message converter ) { this message converter = message converter ; }


checks whether can control member accessible

public static boolean can control member accessible ( ) { try { security manager security manager = system get security manager ( ) ; if ( null ! = security manager ) { security manager check permission ( new reflect permission ( " suppress access checks " ) ) ; } } catch ( security exception e ) { return false ; } return true ; }


returns whether the shuffle button is shown

public boolean get show shuffle button ( ) { return show shuffle button ; }


let prime number be the num buckets , to avoid partition hash and bucket hash congruences

private static int find smaller prime ( int num ) { for ( ; num > 1 ; num - - ) { if ( is prime number ( num ) ) { return num ; } } return num ; }


test that , when zoo keeper fails , the system remains in its current state , without triggering any failovers , and without causing the active node to enter standby state

public void test zoo keeper failure ( ) throws exception { cluster start ( ) ; / / record initial zk sessions long session 0 = cluster get elector ( 0 ) get z k session id for tests ( ) ; long session 1 = cluster get elector ( 1 ) get z k session id for tests ( ) ; log info ( " = = = = = = stopping zk server " ) ; stop server ( ) ; wait for server down ( host port , connection timeout ) ; log info ( " = = = = = = waiting for services to enter neutral mode " ) ; cluster wait for elector state ( 0 , active standby elector state neutral ) ; cluster wait for elector state ( 1 , active standby elector state neutral ) ; log info ( " = = = = = = checking that the services didn ' t change ha state " ) ; assert equals ( h a service state active , cluster get service ( 0 ) state ) ; assert equals ( h a service state standby , cluster get service ( 1 ) state ) ; log info ( " = = = = = = restarting server " ) ; start server ( ) ; wait for server up ( host port , connection timeout ) ; / / nodes should go back to their original states , since they re - obtain / / the same sessions cluster wait for elector state ( 0 , active standby elector state active ) ; cluster wait for elector state ( 1 , active standby elector state standby ) ; / / check ha states didn ' t change cluster wait for h a state ( 0 , h a service state active ) ; cluster wait for h a state ( 1 , h a service state standby ) ; / / check they re - used the same sessions and didn ' t spuriously reconnect assert equals ( session 0 , cluster get elector ( 0 ) get z k session id for tests ( ) ) ; assert equals ( session 1 , cluster get elector ( 1 ) get z k session id for tests ( ) ) ; }


builder for configuring and creating instances of { @ link modify kind set }

public static builder new builder ( ) { return new builder ( ) ; }


sets quality of color quantization ( conversion of images to the maximum 256 colors allowed by the gif specification ) lower values ( minimum = 1 ) produce better colors , but slow processing significantly 10 is the default , and produces good color mapping at reasonable speeds values greater than 20 do not yield significant improvements in speed

public void set quality ( int quality ) { if ( quality < 1 ) quality = 1 ; sample = quality ; }


returns all make variables for a given platform

public immutable map < string , string > get make environment ( ) { return make env ; }


selects all elements from input collection which match the given predicate into an output collection a < code > null < code > predicate matches no elements

public static < e > collection < e > select ( collection < e > input collection , predicate < e > predicate ) { if ( input collection = = null | | predicate = = null ) return new array list < > ( ) ; array list < e > answer = new array list < > ( input collection size ( ) ) ; for ( e o : input collection ) { if ( predicate evaluate ( o ) ) { answer add ( o ) ; } } return answer ; }


unlike { @ link collection # contains ( object ) } which relies on { @ link mime type # equals ( object ) } , this method only checks the type and the subtype , but otherwise ignores parameters

public boolean is present in ( collection < ? extends mime type > mime types ) { for ( mime type mime type : mime types ) { if ( mime type equals type and subtype ( this ) ) { return true ; } } return false ; }


public void test entry set to array ( ) { concurrent map map = map 5 ( ) ; set s = map entry set ( ) ; object [ ] ar = s to array ( ) ; assert equals ( 5 , ar length ) ; for ( int i = 0 ; i < 5 ; + + i ) { assert true ( map contains key ( ( ( map entry ) ( ar [ i ] ) ) get key ( ) ) ) ; assert true ( map contains value ( ( ( map entry ) ( ar [ i ] ) ) get value ( ) ) ) ; } }


sets the number of retries of a version conflict occurs because the document was updated between getting it and updating it defaults to 0

public update request retry on conflict ( int retry on conflict ) { this retry on conflict = retry on conflict ; return this ; }


static list < x attr > to x attrs ( byte [ ] attrs ) { list < x attr > x attrs = new array list < > ( ) ; if ( attrs = = null | | attrs length = = 0 ) { return x attrs ; } for ( int i = 0 ; i < attrs length ; ) { x attr builder builder = new x attr builder ( ) ; / / big - endian int v = ints from bytes ( attrs [ i ] , attrs [ i + 1 ] , attrs [ i + 2 ] , attrs [ i + 3 ] ) ; i + = 4 ; builder set name space ( x attr format get namespace ( v ) ) ; builder set name ( x attr format get name ( v ) ) ; int vlen = ( ( 0xff & attrs [ i ] ) < < 8 ) | ( 0xff & attrs [ i + 1 ] ) ; i + = 2 ; if ( vlen > 0 ) { byte [ ] value = new byte [ vlen ] ; system arraycopy ( attrs , i , value , 0 , vlen ) ; builder set value ( value ) ; i + = vlen ; } x attrs add ( builder build ( ) ) ; } return x attrs ; }


convert the given object to string with each line indented by 4 spaces ( except the first line )

private string to indented string ( object o ) { if ( o = = null ) { return " null " ; } return o to string ( ) replace ( " \ n " , " \ n " ) ; }


public user get user by name ( string username ) { / / todo : implement return null ; }


< code > map & lt ; string , org apache dubbo metadata definition protobuf model phone number & gt ; double map = 9 ; < code >

public boolean contains double map ( java lang string key ) { if ( key = = null ) { throw new java lang null pointer exception ( ) ; } return internal get double map ( ) get map ( ) contains key ( key ) ; }


public < t > api response < t > execute ( call call ) throws api exception { return execute ( call , null ) ; }


make sure a retry call does not hang because of the exception thrown in the first call

public void test update pipeline with fail over ( ) throws exception { cluster shutdown ( ) ; nn rpc = null ; filesystem = null ; cluster = new mini d f s cluster builder ( conf ) nn topology ( mini d f s n n topology simple h a topology ( ) ) num data nodes ( 1 ) build ( ) ; cluster wait active ( ) ; namenode protocols ns 0 = cluster get name node rpc ( 0 ) ; extended block old block = new extended block ( ) ; extended block new block = new extended block ( ) ; datanode i d [ ] new nodes = new datanode i d [ 2 ] ; string [ ] new storages = new string [ 2 ] ; new call ( ) ; try { ns 0 update pipeline ( " test client " , old block , new block , new nodes , new storages ) ; fail ( " expect standby exception from the update pipeline call " ) ; } catch ( standby exception e ) { / / expected , since in the beginning both nn are in standby state generic test utils assert exception contains ( h a service state standby to string ( ) , e ) ; } cluster transition to active ( 0 ) ; try { ns 0 update pipeline ( " test client " , old block , new block , new nodes , new storages ) ; } catch ( i o exception e ) { / / ignore call should not hang } }


return a flag that indicates if multi - object delete recursion is enabled

boolean is enable multi object delete recursion ( ) { return enable multi object delete recursion ; }


final boolean is volatile ( ) { return modifier is volatile ( get modifiers ( ) ) ; }


creates an ssl context builder with ciphers and apn appropriate for g r p c

public static ssl context builder for client ( ) { return configure ( ssl context builder for client ( ) ) ; }


keith now has a converter that supports string to x , if x has a ctor that takes a string in order for round tripping to work we need to string ( ) for x to return what it was constructed with this is a bit of a hack because a place of birth also encapsulates a country - but as it is just a test object , it is ok

public string to string ( ) { return city ; }


public boolean needs scores ( ) { return false ; }


generates the raw byte data of the local file header for the { @ link zip file entry } uses the specified { @ link zip file data } to encode the file name and comment

static byte [ ] create ( zip file entry entry , zip file data file , boolean allow zip 6 4 ) throws i o exception { byte [ ] name = entry get name ( ) get bytes ( file get charset ( ) ) ; / / we don ' t do a defensive copy here so that later , when we write the central directory entry , / / the changes we make here take effect / / todo ( bazel - team ) : this seems like a bug investigate extra data list extra = entry get extra ( ) ; enum set < feature > features = entry get feature set ( ) ; int size = ( int ) entry get size ( ) ; int csize = ( int ) entry get compressed size ( ) ; if ( features contains ( feature zip64 size ) | | features contains ( feature zip64 csize ) ) { if ( ! allow zip 6 4 ) { throw new zip exception ( string format ( " writing an entry of size % d ( % d ) without zip 6 4 " + " extensions is not supported " , entry get size ( ) , entry get compressed size ( ) ) ) ; } extra remove ( ( short ) 0x 0 0 0 1 ) ; int extra size = 0 ; if ( features contains ( feature zip64 size ) ) { size = - 1 ; extra size + = 8 ; } if ( features contains ( feature zip64 csize ) ) { csize = - 1 ; extra size + = 8 ; } byte [ ] zip 6 4 extra = new byte [ extra data fixed data size + extra size ] ; zip util short to little endian ( zip 6 4 extra , extra data id offset , ( short ) 0x 0 0 0 1 ) ; zip util short to little endian ( zip 6 4 extra , extra data length offset , ( short ) extra size ) ; int offset = extra data fixed data size ; if ( features contains ( feature zip64 size ) ) { zip util long to little endian ( zip 6 4 extra , offset , entry get size ( ) ) ; offset + = 8 ; } if ( features contains ( feature zip64 csize ) ) { zip util long to little endian ( zip 6 4 extra , offset , entry get compressed size ( ) ) ; offset + = 8 ; } extra add ( new extra data ( zip 6 4 extra , 0 ) ) ; } else { extra remove ( ( short ) 0x 0 0 0 1 ) ; } extra remove ( extra data list extended timestamp ) ; extra remove ( extra data list infozip unix new ) ; byte [ ] buf = new byte [ fixed data size + name length + extra get length ( ) ] ; zip util int to little endian ( buf , signature offset , signature ) ; zip util short to little endian ( buf , version offset , entry get version needed ( ) ) ; zip util short to little endian ( buf , flags offset , entry get flags ( ) ) ; zip util short to little endian ( buf , method offset , entry get method ( ) get value ( ) ) ; zip util int to little endian ( buf , mod time offset , zip util unix to dos time ( entry get time ( ) ) ) ; zip util int to little endian ( buf , crc offset , ( int ) ( entry get crc ( ) & 0xffffffff ) ) ; zip util int to little endian ( buf , compressed size offset , csize ) ; zip util int to little endian ( buf , uncompressed size offset , size ) ; zip util short to little endian ( buf , filename length offset , ( short ) name length ) ; zip util short to little endian ( buf , extra field length offset , ( short ) extra get length ( ) ) ; system arraycopy ( name , 0 , buf , fixed data size , name length ) ; zip util read fully ( extra get byte stream ( ) , buf , fixed data size + name length , extra get length ( ) ) ; return buf ; }


this directory is bin in eclipse ; it will be a resources directory in the classpath when run in batch mode the directory is one specifically created by and for this test

private file get classes directory ( ) throws file not found exception { file file = get test data type file ( ) ; if ( file = = null ) { throw new file not found exception ( " could not find resource test data type txt " ) ; } file parent = file get parent file ( ) ; string parent path = parent get absolute path ( ) ; int pos = parent path last index of ( " ghidra " ) ; string dest path = parent path substring ( 0 , pos - 1 ) ; string newpath = dest path + file separator + " ghidra " + file separator + " app " + file separator + " test " ; return new file ( newpath ) ; }


test { @ link file system # list located status ( path ) } on a complex directory tree

protected void check list located status status complex dir ( tree scan results tree ) throws throwable { describe ( " expect list located status to list all entries in top dir only " ) ; file system fs = get file system ( ) ; tree scan results listing = new tree scan results ( fs list located status ( tree get base path ( ) ) ) ; listing assert size equals ( " list located status ( ) " , tree files , tree width , 0 ) ; verify file stats ( fs list located status ( tree get base path ( ) ) ) ; / / list located status and list status must return the same files tree scan results list status = new tree scan results ( fs list status ( tree get base path ( ) ) ) ; listing assert equivalent ( list status ) ; / / now check without using list < located file status > status through next = to list through next calls alone ( fs list located status ( tree get base path ( ) ) ) ; tree scan results results through next = new tree scan results ( status through next ) ; list status assert fields equivalent ( " files " , listing , list status get files ( ) , results through next get files ( ) ) ; }


appends a new pattern to the existing one the new pattern enforces strict temporal contiguity this means that the whole pattern sequence matches only if an event which matches this pattern directly follows the preceding matching event thus , there cannot be any events in between two matching events

public pattern < t , t > next ( final string name ) { return new pattern < > ( name , this , consuming strategy strict , after match skip strategy ) ; }


public void add pet ( pet pet ) throws timeout exception , execution exception , interrupted exception , api exception { object post body = pet ; / / verify the required parameter ' pet ' is set if ( pet = = null ) { volley error error = new volley error ( " missing the required parameter ' pet ' when calling add pet " , new api exception ( 400 , " missing the required parameter ' pet ' when calling add pet " ) ) ; } / / create path and map variables string path = " / pet " ; / / query params list < pair > query params = new array list < pair > ( ) ; / / header params map < string , string > header params = new hash map < string , string > ( ) ; / / form params map < string , string > form params = new hash map < string , string > ( ) ; string [ ] content types = { " application / json " , " application / xml " } ; string content type = content types length > 0 ? content types [ 0 ] : " application / json " ; if ( content type starts with ( " multipart / form - data " ) ) { / / file uploading multipart entity builder local var builder = multipart entity builder create ( ) ; http entity http entity = local var builder build ( ) ; post body = http entity ; } else { / / normal form params } string [ ] auth names = new string [ ] { " petstore auth " } ; try { string local var response = api invoker invoke a p i ( base path , path , " post " , query params , post body , header params , form params , content type , auth names ) ; if ( local var response ! = null ) { return ; } else { return ; } } catch ( api exception ex ) { throw ex ; } catch ( interrupted exception ex ) { throw ex ; } catch ( execution exception ex ) { if ( ex get cause ( ) instanceof volley error ) { volley error volley error = ( volley error ) ex get cause ( ) ; if ( volley error network response ! = null ) { throw new api exception ( volley error network response status code , volley error get message ( ) ) ; } } throw ex ; } catch ( timeout exception ex ) { throw ex ; } }


return { @ code true } if the supplied node describes an advice type may be one of : ' { @ code before } ' , ' { @ code after } ' , ' { @ code after - returning } ' , ' { @ code after - throwing } ' or ' { @ code around } '

private boolean is advice node ( node a node , parser context parser context ) { if ( ! ( a node instanceof element ) ) { return false ; } else { string name = parser context get delegate ( ) get local name ( a node ) ; return ( before equals ( name ) | | after equals ( name ) | | after returning element equals ( name ) | | after throwing element equals ( name ) | | around equals ( name ) ) ; } }


checks a programs memory for direct references to the addresses indicated in the to address set direct references are only found at addresses that match the indicated alignment each direct reference is added to the direct reference list as a fromto address pair

public static void load direct reference list ( program program , int alignment , address to address , address set view to address set , accumulator < reference address pair > accumulator , task monitor monitor ) throws cancelled exception { if ( monitor = = null ) { monitor = task monitor adapter dummy monitor ; } memory memory = program get memory ( ) ; boolean is big endian = memory is big endian ( ) ; int unit size = to address get address space ( ) get addressable unit size ( ) ; / / number of bytes per addressable unit int addr size = to address get size ( ) ; short current segment = 0 ; if ( to address set = = null | | to address set get num addresses ( ) = = 1 ) { set < address > ref addrs = find direct references ( program , alignment , to address , monitor ) ; iterator < address > ref addr iter = ref addrs iterator ( ) ; while ( ref addr iter has next ( ) & & ! monitor is cancelled ( ) ) { accumulator add ( new reference address pair ( ref addr iter next ( ) , to address ) ) ; } return ; } / / just looking for the offset into the segment now , not the whole segment / offset pair if ( to address instanceof segmented address ) { segmented address seg addr = ( segmented address ) to address ; current segment = ( short ) seg addr get segment ( ) ; } / / iterate over addresses in program address iterator addr it = memory get loaded and initialized address set ( ) get addresses ( true ) ; monitor initialize ( memory get num addresses ( ) ) ; int count = 0 ; while ( addr it has next ( ) ) { monitor check canceled ( ) ; address a = addr it next ( ) ; + + count ; monitor set progress ( count ) ; if ( ( a get offset ( ) % alignment ) ! = 0 ) { continue ; } long addr long = 0 ; long addr long shifted = 0 ; try { if ( to address instanceof segmented address ) { short offset short = memory get short ( a ) ; offset short & = offset short & 0xffff ; / / this is checking to see if the ref is in the same segment as the to addr - not sure this is needed anymore / / segmented address sega = ( ( segmented address ) a ) ; / / short short sega = ( short ) ( sega get segment ( ) ) ; / / short sega & = short sega & 0xffff ; / / if ( offset short = = short current offset ) { /


method supporting the meta - data processing for a table

private void locate table and process meta data ( database meta data database meta data , @ nullable string catalog name , @ nullable string schema name , @ nullable string table name ) { map < string , table meta data > table meta = new hash map < > ( ) ; result set tables = null ; try { tables = database meta data get tables ( catalog name to use ( catalog name ) , schema name to use ( schema name ) , table name to use ( table name ) , null ) ; while ( tables ! = null & & tables next ( ) ) { table meta data tmd = new table meta data ( ) ; tmd set catalog name ( tables get string ( " table cat " ) ) ; tmd set schema name ( tables get string ( " table schem " ) ) ; tmd set table name ( tables get string ( " table name " ) ) ; if ( tmd get schema name ( ) = = null ) { table meta put ( this user name ! = null ? this user name to upper case ( ) : " " , tmd ) ; } else { table meta put ( tmd get schema name ( ) to upper case ( ) , tmd ) ; } } } catch ( s q l exception ex ) { if ( logger is warn enabled ( ) ) { logger warn ( " error while accessing table meta - data results : " + ex get message ( ) ) ; } } finally { jdbc utils close result set ( tables ) ; } if ( table meta is empty ( ) ) { if ( logger is info enabled ( ) ) { logger info ( " unable to locate table meta - data for ' " + table name + " ' : column names must be provided " ) ; } } else { process table columns ( database meta data , find table meta data ( schema name , table name , table meta ) ) ; } }


a priority , from 0 to 10 that this provider should be used , taking the current environment into consideration 5 should be considered the default , and then tweaked based on environment detection a priority of 0 does not imply that the provider wouldn ' t work ; just that it should be last in line


checks if writing is finished readers cannot be created until writing is finished , and no further writes can happen after that

public boolean is finished ( ) { return is finished ; }


returns the original element list , unchanged

public list < object > order ( list < object > insertion order ) { return insertion order ; }


returns the tree font size enabled of this m t config object

public boolean is tree font size enabled ( ) { return tree font size enabled ; }


public static string get store mode ( ) { return string utils trim to null ( system getenv ( env store mode key ) ) ; }


returns the total number of key - value headers in this metadata , including duplicates


returns a view of { @ code unfiltered } containing all elements that are of the type { @ code desired type } the returned iterable ' s iterator does not support { @ code remove ( ) } < b > { @ code stream } equivalent : < b > { @ code stream filter ( type : : is instance ) map ( type : : cast ) } this does perform a little more work than necessary , so another option is to insert an unchecked cast at some later point : { @ code @ suppress warnings ( " unchecked " ) safe because of : : is instance check immutable list < new type > result = ( immutable list ) stream filter ( new type class : : is instance ) collect ( to immutable list ( ) ) ; }

public static < t > iterable < t > filter ( final iterable < ? > unfiltered , final class < t > desired type ) { check not null ( unfiltered ) ; check not null ( desired type ) ; return ( iterable < t > ) filter ( unfiltered , predicates instance of ( desired type ) ) ; }


an string interner for rule and build statements ' variable names

interner < string > get name interner ( ) ;


constructs a new distance based sort on a geo point like field

public static geo distance sort builder geo distance sort ( string field name , geo point points ) { return new geo distance sort builder ( field name , points ) ; }


public boolean equals ( final object o ) { if ( this = = o ) { return true ; } if ( o = = null | | get class ( ) ! = o get class ( ) ) { return false ; } key path key path = ( key path ) o ; return key equals ( key path key ) ; }


create a test { @ link class loader } that disable the use of the index , even if resources are present at the standard location

public static class loader disable index ( class loader class loader ) { return new candidate components test class loader ( class loader , collections enumeration ( collections empty list ( ) ) ) ; }


returns the index of a group within the array

public int index of ( track group group ) { for ( int i = 0 ; i < length ; i + + ) { / / suppressed reference equality warning because this is looking for the index of a specific / / track group object , not the index of a potential equal track group if ( track groups [ i ] = = group ) { return i ; } } return c index unset ; }


returns true if this cached response should be used ; false if the network response should be used

public boolean validate ( response headers network response ) { if ( network response headers get response code ( ) = = http u r l connection http not modified ) { return true ; } / * * the http spec says that if the network ' s response is older than our * cached response , we may return the cache ' s response like chrome ( but * unlike firefox ) , this client prefers to return the newer response * / if ( last modified ! = null & & network response last modified ! = null & & network response last modified get time ( ) < last modified get time ( ) ) { return true ; } return false ; }


public string get simple string not null ( ) { return simple string not null ; }


test for the choose low redundancy blocks are processed based on priority

public void test choose low redundancy blocks ( ) throws exception { low redundancy blocks low redundancy blocks = new low redundancy blocks ( ) ; for ( int i = 0 ; i < 5 ; i + + ) { / / adding queue highest priority block low redundancy blocks add ( gen block info ( thread local random current ( ) next long ( ) ) , 1 , 0 , 0 , 3 ) ; / / adding queue very low redundancy block low redundancy blocks add ( gen block info ( thread local random current ( ) next long ( ) ) , 2 , 0 , 0 , 7 ) ; / / adding queue replicas badly distributed block low redundancy blocks add ( gen block info ( thread local random current ( ) next long ( ) ) , 6 , 0 , 0 , 6 ) ; / / adding queue low redundancy block low redundancy blocks add ( gen block info ( thread local random current ( ) next long ( ) ) , 5 , 0 , 0 , 6 ) ; / / adding queue with corrupt blocks block low redundancy blocks add ( gen block info ( thread local random current ( ) next long ( ) ) , 0 , 0 , 0 , 3 ) ; } / / choose 6 blocks from low redundancy blocks then it should pick 5 blocks / / from queue highest priority and 1 block from queue very low redundancy list < list < block info > > chosen blocks = low redundancy blocks choose low redundancy blocks ( 6 ) ; assert the chosen blocks ( chosen blocks , 5 , 1 , 0 , 0 , 0 ) ; / / choose 10 blocks from low redundancy blocks then it should pick 4 blocks / / from queue very low redundancy , 5 blocks from queue low redundancy and 1 / / block from queue replicas badly distributed chosen blocks = low redundancy blocks choose low redundancy blocks ( 10 ) ; assert the chosen blocks ( chosen blocks , 0 , 4 , 5 , 1 , 0 ) ; / / adding queue highest priority low redundancy blocks add ( gen block info ( thread local random current ( ) next long ( ) ) , 0 , 1 , 0 , 3 ) ; / / choose 10 blocks from low redundancy blocks then it should pick 1 block / / from queue highest priority , 4 blocks from / / queue replicas badly distributed chosen blocks = low redundancy blocks choose low redundancy blocks ( 10 ) ; assert the chosen blocks ( chosen blocks , 1 , 0 , 0 , 4 ) ; / / since it is reached to end of all lists , / / should start picking the blocks from start / / choose 7 blocks from low redundancy blocks then it should pick 6 blocks / / from queue highest priority , 1 block from queue very low redundancy chosen blocks = low redundancy blocks choose low redundancy blocks ( 7 ) ; assert the chosen blocks ( chosen blocks , 6 , 1 , 0 , 0 , 0 ) ; }


test a cluster with even distribution , then a new empty node is added to the cluster test start a cluster with specified number of nodes , and fills it to be 30 % full ( with a single file replicated identically to all datanodes ) ; it then adds one new empty node and starts balancing

public void test balancer with h a name nodes ( ) throws exception { configuration conf = new hdfs configuration ( ) ; test balancer init conf ( conf ) ; assert equals ( test capacities length , test racks length ) ; n n conf nn 1 conf = new mini d f s n n topology n n conf ( " nn 1 " ) ; nn 1 conf set ipc port ( hdfs client config keys dfs namenode rpc port default ) ; configuration copied conf = new configuration ( conf ) ; cluster = new mini d f s cluster builder ( copied conf ) nn topology ( mini d f s n n topology simple h a topology ( ) ) num data nodes ( test capacities length ) racks ( test racks ) simulated capacities ( test capacities ) build ( ) ; h a test util set failover configurations ( cluster , conf ) ; try { cluster wait active ( ) ; cluster transition to active ( 0 ) ; thread sleep ( 500 ) ; client = name node proxies create proxy ( conf , file system get default uri ( conf ) , client protocol class ) get proxy ( ) ; do test ( conf ) ; } finally { cluster shutdown ( ) ; } }


serializes and deserializes the specified object < b > gwt warning : < b > under gwt , this method simply returns its input , as proper gwt serialization tests require more setup this no - op behavior allows test authors to intersperse { @ code serializable tester } calls with other , gwt - compatible tests note that the specified object may not be known by the compiler to be a { @ link java io serializable } instance , and is thus declared an { @ code object } for example , it might be declared as a { @ code list }

public static < t > t reserialize ( t object ) { return platform reserialize ( object ) ; }


get a list of all the call parameters to be used for call this includes any parameters added based on meta - data processing

protected list < sql parameter > get call parameters ( ) { return this call meta data context get call parameters ( ) ; }


protected one locals array get primary ( ) { return primary ; }


reads all of the lines from a { @ link readable } object the lines do not include line - termination characters , but do include other leading and trailing whitespace does not close the { @ code readable } if reading files or resources you should use the { @ link files # read lines } and { @ link resources # read lines } methods

public static list < string > read lines ( readable r ) throws i o exception { list < string > result = new array list < > ( ) ; line reader line reader = new line reader ( r ) ; string line ; while ( ( line = line reader read line ( ) ) ! = null ) { result add ( line ) ; } return result ; }


ensures that { @ code expression } is { @ code true } , throwing a { @ code verify exception } with a custom message otherwise see { @ link # verify ( boolean , string , object ) } for details

public static void verify ( boolean expression , @ nullable decl string error message template , @ nullable decl object p 1 , @ nullable decl object p 2 , @ nullable decl object p 3 ) { if ( ! expression ) { throw new verify exception ( lenient format ( error message template , p 1 , p 2 , p 3 ) ) ; } }


test the rename undo when quota of dst tree is exceeded after rename

public void test rename exceed quota ( ) throws exception { final path test = new path ( " / test " ) ; final path dir 1 = new path ( test , " dir 1 " ) ; final path dir 2 = new path ( test , " dir 2 " ) ; final path sub dir 2 = new path ( dir 2 , " subdir " ) ; final path subfile dir 2 = new path ( sub dir 2 , " subfile " ) ; hdfs mkdirs ( dir 1 ) ; d f s test util create file ( hdfs , subfile dir 2 , blocksize , repl , seed ) ; final path foo = new path ( dir 1 , " foo " ) ; d f s test util create file ( hdfs , foo , blocksize , repl , seed ) ; snapshot test helper create snapshot ( hdfs , dir 1 , " s 1 " ) ; snapshot test helper create snapshot ( hdfs , dir 2 , " s 2 " ) ; / / set ns quota of dir 2 to 4 , so the current remaining is 1 ( already has / / dir 2 , sub dir 2 , subfile dir 2 , and s 2 ) hdfs set quota ( dir 2 , 5 , long max value - 1 ) ; / / rename / test / dir 1 / foo to / test / dir 2 / sub dir 2 / subfile dir 2 / / f s directory # verify quota 4 rename will pass since foo only be counted / / as 1 in ns quota the rename operation will succeed while the real quota / / of dir 2 will become 7 ( dir 2 , s 2 in dir 2 , sub dir 2 , s 2 in sub dir 2 , / / subfile dir 2 in deleted list , new subfile , s 1 in new subfile ) hdfs rename ( foo , subfile dir 2 , rename overwrite ) ; / / check dir 2 i node dir 2 node = fsdir get i node 4 write ( dir 2 to string ( ) ) ; assert true ( dir 2 node as directory ( ) is snapshottable ( ) ) ; quota counts counts = dir 2 node compute quota usage ( fsdir get block storage policy suite ( ) ) ; assert equals ( 4 , counts get name space ( ) ) ; assert equals ( blocksize * repl * 2 , counts get storage space ( ) ) ; }


returns an address range iterator over all occupied ranges in the map

public address range iterator get address ranges ( ) { return new range iterator ( ) ; }


initialize the view to select tracks for a specified renderer using { @ link mapped track info } and a set of { @ link default track selector parameters }

public void init ( mapped track info mapped track info , int renderer index , boolean is disabled , list < selection override > overrides , @ nullable comparator < format > track format comparator , @ nullable track selection listener listener ) { this mapped track info = mapped track info ; this renderer index = renderer index ; this is disabled = is disabled ; this track info comparator = track format comparator = = null ? null : ( o 1 , o 2 ) - > track format comparator compare ( o 1 format , o 2 format ) ; this listener = listener ; int max overrides = allow multiple overrides ? overrides size ( ) : math min ( overrides size ( ) , 1 ) ; for ( int i = 0 ; i < max overrides ; i + + ) { selection override override = overrides get ( i ) ; this overrides put ( override group index , override ) ; } update views ( ) ; }


any comments associated with the plural < code > optional string comment = 2 ; < code >

public java lang string get comment ( ) { return comment ; }


execute a command with the default { @ link command config }

< t > t execute ( command < t > command ) ;


patch another - fakedummy : to test special tags to test special tags and operation id starting with number

response entity < client > call 1 2 3test special tags ( @ api param ( value = " client model " , required = true ) @ valid @ request body client body ) ;


returns whether a point with the given coordinates is contained within the shape

boolean contains ( float x , float y ) ;


visit a parse tree produced by the { @ code interval literal } labeled alternative in { @ link sql base parser # constant }

t visit interval literal ( sql base parser interval literal context ctx ) ;


{ @ inherit doc } increment the transfer duration ; decrement the { @ code stream write block uploads active } gauge

public void block upload completed ( duration time since upload started , int block size ) { transfer duration add and get ( time since upload started to millis ( ) ) ; inc all gauges ( stream write block uploads active , - 1 ) ; block uploads completed increment and get ( ) ; }


called when the property of monotonously ascending timestamps is violated , i e , when { @ code element timestamp < last timestamp }

void handle violation ( long element timestamp , long last timestamp ) ;


replaces the entire view ' s content with the content of the given { @ link list }

public void set list ( list < t > list ) { this list = list ; }


performs auto merge of bytes and code units followed by merge of byte and code unit conflicts

private void merge external functions ( task monitor monitor ) throws program conflict exception , memory access exception , cancelled exception { empty listing view for programs ( ) ; display initial phase message ( externals phase , " merge of external function and label changes " ) ; conflict info panel set conflict type ( external function merger get conflict type ( ) ) ; current merger = external function merger ; / / only one merger so it gets all of the progress bar to fill in int progress min = 0 ; int progress max = 100 ; external function merger auto merge ( progress min , progress max , monitor ) ; progress min = progress max ; merge manager show progress icon ( false ) ; external function merger merge conflicts ( conflict option , conflict info panel , monitor ) ; merge manager show progress icon ( true ) ; remove bottom component ( ) ; merge manager set completed ( externals phase ) ; set listing views to entire program ( ) ; external function merger dispose ( ) ; }


returns the current size limit , past which no calculations will be performed

public int get size limit ( ) { return size limit ; }


the transition of the safe mode state machine if safe mode is not currently on , this is a no - op

void check safe mode ( ) { assert namesystem has write lock ( ) ; if ( namesystem in transition to active ( ) ) { return ; } switch ( status ) { case pending threshold : if ( are thresholds met ( ) ) { if ( block total > 0 & & extension > 0 ) { / / pending threshold - > extension status = b m safe mode status extension ; reached time set ( monotonic now ( ) ) ; smmthread start ( ) ; initialize repl queues if necessary ( ) ; report status ( " state * safe mode extension entered " , true ) ; } else { / / pending threshold - > off leave safe mode ( false ) ; } } else { initialize repl queues if necessary ( ) ; report status ( " state * safe mode on " , false ) ; } break ; case extension : report status ( " state * safe mode on " , false ) ; break ; case off : break ; default : assert false : " non - recognized block manager safe mode status : " + status ; } }


the stage x coordinate where the event occurred valid for : touch down , touch dragged , touch up , mouse moved , enter , and exit

public float get stage x ( ) { return stage x ; }


visits each non - subroutine block once in depth - first successor order

private void for each non sub block depth first ( int first label , basic block visitor v ) { for each non sub block depth first 0 ( label to block ( first label ) , v , new bit set ( max label ) ) ; }


private string [ ] get history file path ( ) { file path = new file ( config logging dir ) ; string [ ] path arr = path list ( new filename filter ( ) { @ override public boolean accept ( file dir , string name ) { return filename pattern matcher ( name ) matches ( ) ; } } ) ; return path arr ; }


get the content of the request body as a { @ code string } , using the configured { @ linkplain # get character encoding character encoding }

public string get content as string ( ) throws illegal state exception , unsupported encoding exception { assert state ( this character encoding ! = null , " cannot get content as a string for a null character encoding " + " consider setting the character encoding in the request " ) ; if ( this content = = null ) { return null ; } return new string ( this content , this character encoding ) ; }


returns the retargeted class member of the given class member

private member update referenced member ( member referenced member , string name , string type , clazz new referenced class ) { if ( referenced member = = null ) { return null ; } return referenced member instanceof field ? ( member ) new referenced class find field ( name , type ) : ( member ) new referenced class find method ( name , type ) ; }


enters this monitor when the guard is satisfied blocks indefinitely

public void enter when uninterruptibly ( guard guard ) { if ( guard monitor ! = this ) { throw new illegal monitor state exception ( ) ; } final reentrant lock lock = this lock ; boolean signal before waiting = lock is held by current thread ( ) ; lock lock ( ) ; boolean satisfied = false ; try { if ( ! guard is satisfied ( ) ) { await uninterruptibly ( guard , signal before waiting ) ; } satisfied = true ; } finally { if ( ! satisfied ) { leave ( ) ; } } }


post storeorder : place an order for a pet

default response entity < order > place order ( order body ) { get request ( ) if present ( request - > { for ( media type media type : media type parse media types ( request get header ( " accept " ) ) ) { if ( media type is compatible with ( media type value of ( " application / json " ) ) ) { string example string = " { \ " pet id \ " : 6 , \ " quantity \ " : 1 , \ " id \ " : 0 , \ " ship date \ " : \ " 2000 - 01 - 23t04 : 56 : 07 000 + 00 : 00 \ " , \ " complete \ " : false , \ " status \ " : \ " placed \ " } " ; api util set example response ( request , " application / json " , example string ) ; break ; } if ( media type is compatible with ( media type value of ( " application / xml " ) ) ) { string example string = " < order > < id > 123456789 < / id > < pet id > 123456789 < / pet id > < quantity > 123 < / quantity > < ship date > 2000 - 01 - 23t04 : 56 : 07 000z < / ship date > < status > aeiou < / status > < complete > true < / complete > < / order > " ; api util set example response ( request , " application / xml " , example string ) ; break ; } } } ) ; return new response entity < > ( http status not implemented ) ; }


mark the given shards as started , then perform a reroute ( which may start some other shards initializing )

public static cluster state start shards and reroute ( allocation service allocation service , cluster state cluster state , list < shard routing > initializing shards ) { return allocation service reroute ( allocation service apply started shards ( cluster state , initializing shards ) , " reroute after starting " ) ; }


return the input proxy , cast as a { @ link client protocol } this catches any { @ link class cast exception } and wraps it in a more helpful message this should only be called if the caller is certain that the proxy is , in fact , a { @ link client protocol }

private client protocol get proxy as client protocol ( t proxy ) { assert proxy instanceof client protocol : " bug : attempted to use proxy " + " of class " + proxy get class ( ) + " as if it was a client protocol " ; return ( client protocol ) proxy ; }


obtain the default type converter for this method invoker called if no explicit type converter has been specified the default implementation builds a { @ link org springframework beans simple type converter } can be overridden in subclasses

protected type converter get default type converter ( ) { return new simple type converter ( ) ; }


creates an unmodifiable , empty collection of values this is used in { @ link # remove all } on an empty key

collection < v > create unmodifiable empty collection ( ) { return unmodifiable collection subclass ( create collection ( ) ) ; }


adds the given constraint values to the constraints that define this { @ link platform info }

public builder add constraints ( iterable < constraint value info > constraints ) { this constraints add constraints ( constraints ) ; return this ; }


write a string using the utf - 8 encoding to the terminal client

public final void write ( string data ) { byte [ ] bytes = data get bytes ( standard charsets utf 8 ) ; write ( bytes , 0 , bytes length ) ; }


checks the number of threads configured for parallel loading and return an executor service with configured number of threads if the thread count is set to less than 1 , it will be reset to the default value

private executor service get parallel executor service ( ) { int threads = conf get int ( d f s config keys dfs image parallel threads key , d f s config keys dfs image parallel threads default ) ; if ( threads < 1 ) { log warn ( " parallel is enabled and { } is set to { } setting to the " + " default value { } " , d f s config keys dfs image parallel threads key , threads , d f s config keys dfs image parallel threads default ) ; threads = d f s config keys dfs image parallel threads default ; } executor service executor service = executors new fixed thread pool ( threads ) ; log info ( " the fsimage will be loaded in parallel using { } threads " , threads ) ; return executor service ; }


get the latest session key from the config state

public session key session key ( ) { return session key ; }


test namenode format with - format option when a non empty name directory exists enter n when prompted and format should be aborted

public void test format without force enter no ( ) throws i o exception , interrupted exception { / / we check for a non empty dir , so create a child path file data = new file ( hdfs dir , " file " ) ; if ( ! data mkdirs ( ) ) { fail ( " failed to create dir " + data get path ( ) ) ; } / / capture the input stream input stream orig in = system in ; byte array input stream bins = new byte array input stream ( " n \ n " get bytes ( ) ) ; system set in ( bins ) ; string [ ] argv = { " - format " } ; try { name node create name node ( argv , config ) ; fail ( " create name node ( ) did not call system exit ( ) " ) ; } catch ( exit exception e ) { assert equals ( " format should not have succeeded " , 1 , e status ) ; } system set in ( orig in ) ; / / check if the version file does not exists file version = new file ( hdfs dir , " current / version " ) ; assert false ( " check version should not exist " , version exists ( ) ) ; }


removes the specified object from this set

public boolean remove ( object object ) { final int index = index of ( object ) ; if ( index > = 0 ) { remove at ( index ) ; return true ; } return false ; }


set the color used to fade the pane covered by the sliding pane out when the pane will become fully covered in the expanded state

public void set covered fade color ( int color ) { m covered fade color = color ; request layout ( ) ; }