parses the next symbol argument of a load statement and puts it into the output map the symbol is either " name " ( string ) or name = " declared " ( identifier equals string ) if no alias is used , " name " and " declared " will be identical " declared " refers to the original name in the bazel file that should be loaded , while " name " will be the key of the entry in the map

private void parse load symbol ( immutable list builder < load statement binding > symbols ) { if ( token kind ! = token kind string & & token kind ! = token kind identifier ) { syntax error ( " expected either a literal string or an identifier " ) ; return ; } string name = ( string ) token value ; int name offset = token start + ( token kind = = token kind string ? 1 : 0 ) ; identifier local = new identifier ( locs , name , name offset ) ; identifier original ; if ( token kind = = token kind string ) { / / load ( , " name " ) original = local ; } else { / / load ( , local = " orig " ) / / the name " orig " is morally an identifier but , for legacy reasons ( specifically , / / a partial implementation of starlark embedded in a python interpreter used by / / tests of blaze ) , it must be a quoted string literal expect ( token kind identifier ) ; expect ( token kind equals ) ; if ( token kind ! = token kind string ) { syntax error ( " expected string " ) ; return ; } original = new identifier ( locs , ( string ) token value , token start + 1 ) ; } next token ( ) ; symbols add ( new load statement binding ( local , original ) ) ; }


to test enum parameters to test enum parameters

public void test enum parameters ( list < string > enum header string array , string enum header string , list < string > enum query string array , string enum query string , integer enum query integer , double enum query double , list < string > enum form string array , string enum form string ) throws api exception { test enum parameters with http info ( enum header string array , enum header string , enum query string array , enum query string , enum query integer , enum query double , enum form string array , enum form string ) ; }


called after the delete operation occurred note that this is also called when deleting a document did not succeed due to document related failures see { @ link # post delete ( shard id , engine delete , exception ) } for engine level failures

default void post delete ( shard id shard id , engine delete delete , engine delete result result ) { }


blocks the named executor by getting its only thread running a task blocked on a cyclic barrier and fills the queue with a noop task so requests to use this queue should get { @ link es rejected execution exception } s

private cyclic barrier block executor ( string name , string node ) throws exception { thread pool thread pool = internal cluster ( ) get instance ( thread pool class , node ) ; cyclic barrier barrier = new cyclic barrier ( 2 ) ; logger info ( " blocking the [ { } ] executor " , name ) ; thread pool executor ( name ) execute ( ( ) - > { try { thread pool executor ( name ) execute ( ( ) - > { } ) ; barrier await ( ) ; logger info ( " blocked the [ { } ] executor " , name ) ; barrier await ( ) ; logger info ( " unblocking the [ { } ] executor " , name ) ; } catch ( exception e ) { throw new runtime exception ( e ) ; } } ) ; barrier await ( ) ; blocked executors add ( barrier ) ; return barrier ; }


{ @ inherit doc } the default implementation does nothing

@ override public void exit top clause ( sql base parser top clause context ctx ) { }


public void set result ( vv result ) { out val f 1 = result ; out collect ( out val ) ; }


startup step tag ( string key , string value ) ;


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


public okhttp 3 call get inventory call ( final api callback callback ) throws api exception { object local var post body = null ; / / create path and map variables string local var path = " / store / inventory " ; list < pair > local var query params = new array list < pair > ( ) ; list < pair > local var collection query params = new array list < pair > ( ) ; map < string , string > local var header params = new hash map < string , string > ( ) ; map < string , string > local var cookie params = new hash map < string , string > ( ) ; map < string , object > local var form params = new hash map < string , object > ( ) ; final string [ ] local var accepts = { " application / json " } ; final string local var accept = local var api client select header accept ( local var accepts ) ; if ( local var accept ! = null ) { local var header params put ( " accept " , local var accept ) ; } final string [ ] local var content types = { } ; final string local var content type = local var api client select header content type ( local var content types ) ; local var header params put ( " content - type " , local var content type ) ; string [ ] local var auth names = new string [ ] { " api key " } ; return local var api client build call ( local var path , " get " , local var query params , local var collection query params , local var post body , local var header params , local var cookie params , local var form params , local var auth names , callback ) ; }


this module checks if the resource which was localized is already present or not

public boolean is resource present ( localized resource rsrc ) { boolean ret = true ; if ( rsrc get state ( ) = = resource state localized ) { file file = new file ( rsrc get local path ( ) to uri ( ) get raw path ( ) to string ( ) ) ; if ( ! file exists ( ) ) { ret = false ; } else if ( dirs handler ! = null ) { ret = check local resource ( rsrc ) ; } } return ret ; }


public static void put surrogate authentication accounts ( final request context request context , final list < string > surrogates ) { request context get flow scope ( ) put ( " surrogates " , surrogates ) ; }


this is for covering a case where the service manager would behave strangely if constructed with no service under management listeners would never fire because the service manager was healthy and stopped at the same time this test ensures that listeners fire and is healthy makes sense

public void test empty service manager ( ) { logger logger = logger get logger ( service manager class get name ( ) ) ; logger set level ( level finest ) ; test log handler log handler = new test log handler ( ) ; logger add handler ( log handler ) ; service manager manager = new service manager ( arrays < service > as list ( ) ) ; recording listener listener = new recording listener ( ) ; manager add listener ( listener , direct executor ( ) ) ; manager start async ( ) await healthy ( ) ; assert true ( manager is healthy ( ) ) ; assert true ( listener healthy called ) ; assert false ( listener stopped called ) ; assert true ( listener failed services is empty ( ) ) ; manager stop async ( ) await stopped ( ) ; assert false ( manager is healthy ( ) ) ; assert true ( listener stopped called ) ; assert true ( listener failed services is empty ( ) ) ; / / check that our no op service is not directly observable via any of the inspection methods or / / via logging assert equals ( " service manager { services = [ ] } " , manager to string ( ) ) ; assert true ( manager services by state ( ) is empty ( ) ) ; assert true ( manager startup times ( ) is empty ( ) ) ; formatter log formatter = new formatter ( ) { @ override public string format ( log record record ) { return format message ( record ) ; } } ; for ( log record record : log handler get stored log records ( ) ) { assert that ( log formatter format ( record ) ) does not contain ( " no op service " ) ; } }


adds a constructor parameter value of literal type the type is automatically derived from the value currently , this is supported for : boolean , int , double , and varchar expression values are not allowed examples : - " true " , " false " - > boolean - " 42 " , " - 5 " - > int - " 2 0 " , " 1234 222 " - > double - varchar otherwise for other types and explicit type declaration use { @ link # parameter ( string , string ) } or { @ link # parameter ( type information , string ) }

public class instance parameter string ( string value string ) { constructor add ( left ( new literal value ( ) value ( value string ) ) ) ; return this ; }


helper method to build sds server ssl context provider from given names

private sds server ssl context provider get sds server ssl context provider ( string cert name , string validation context name , iterable < string matcher > match subject alt names , iterable < string > alpn protocols ) throws i o exception { common tls context common tls context = common tls context tests util build common tls context with additional values ( cert name , / * cert target uri = * / " inproc " , validation context name , / * validation context target uri = * / " inproc " , match subject alt names , alpn protocols , / * channel type = * / " inproc " ) ; return sds server ssl context provider get provider ( common tls context tests util build internal downstream tls context ( common tls context , / * require client cert = * / false ) , node , more executors direct executor ( ) , more executors direct executor ( ) ) ; }


reads whole ( including chunk type ) string block from stream stream must be at the chunk type

public static string block read ( ext data input reader ) throws i o exception { reader skip check chunk type int ( chunk stringpool type , chunk null type ) ; int chunk size = reader read int ( ) ; int string count = reader read int ( ) ; int style count = reader read int ( ) ; int flags = reader read int ( ) ; int strings offset = reader read int ( ) ; int styles offset = reader read int ( ) ; string block block = new string block ( ) ; block m is u t f 8 = ( flags & utf8 flag ) ! = 0 ; block m string offsets = reader read int array ( string count ) ; block m string owns = new int [ string count ] ; arrays fill ( block m string owns , - 1 ) ; if ( style count ! = 0 ) { block m style offsets = reader read int array ( style count ) ; } { int size = ( ( styles offset = = 0 ) ? chunk size : styles offset ) - strings offset ; if ( ( size % 4 ) ! = 0 ) { throw new i o exception ( " string data size is not multiple of 4 ( " + size + " ) " ) ; } block m strings = new byte [ size ] ; reader read fully ( block m strings ) ; } if ( styles offset ! = 0 ) { int size = ( chunk size - styles offset ) ; if ( ( size % 4 ) ! = 0 ) { throw new i o exception ( " style data size is not multiple of 4 ( " + size + " ) " ) ; } block m styles = reader read int array ( size / 4 ) ; } return block ; }


set the name of the catalog for this context

public void set catalog name ( @ nullable string catalog name ) { this catalog name = catalog name ; }


returns whether this converter tester has a test for the given input , i e , add equality group was called with the given string

public boolean has test for input ( string input ) { return tested inputs contains ( input ) ; }


returns a new < tt > string value < tt > string that is a substring of this string the substring begins at the given < code > start < code > index and ends at < code > end - 1 < code >

public string value substring ( int start , int end ) { return new string value ( this , start , end - start ) ; }


finish a multipart upload process , which will merge all parts uploaded

public complete multipart upload result complete multipart upload ( string key , string upload id , list < part e tag > part e tag list ) { collections sort ( part e tag list , new comparator < part e tag > ( ) { @ override public int compare ( part e tag o 1 , part e tag o 2 ) { return o 1 get part number ( ) - o 2 get part number ( ) ; } } ) ; log info ( " complete the multipart upload bucket : [ { } ] , cos key : [ { } ] , " + " upload id : [ { } ] " , bucket name , key , upload id ) ; complete multipart upload request complete multipart upload request = new complete multipart upload request ( bucket name , key , upload id , part e tag list ) ; return cos client complete multipart upload ( complete multipart upload request ) ; }


removes all ranges from this { @ code range set } ( optional operation ) after this operation , { @ code this contains ( c ) } will return false for all { @ code c } this is equivalent to { @ code remove ( range all ( ) ) }


determine if this variable storage intersects the specified variable storage

public boolean intersects ( variable storage variable storage ) { varnode [ ] other varnodes = variable storage varnodes ; if ( varnodes = = null | | other varnodes = = null ) { return false ; } for ( int i = 0 ; i < varnodes length ; i + + ) { for ( int j = 0 ; j < other varnodes length ; j + + ) { if ( varnodes [ i ] intersects ( other varnodes [ j ] ) ) { return true ; } } } return false ; }


create an in - memory { @ link window bytes store supplier } this store supplier can be passed into a { @ link # window store builder ( window bytes store supplier , serde , serde ) } or { @ link # timestamped window store builder ( window bytes store supplier , serde , serde ) }

public static window bytes store supplier in memory window store ( final string name , final duration retention period , final duration window size , final boolean retain duplicates ) throws illegal argument exception { objects require non null ( name , " name cannot be null " ) ; final string repartition period error message prefix = prepare millis check fail msg prefix ( retention period , " retention period " ) ; final long retention ms = validate millisecond duration ( retention period , repartition period error message prefix ) ; if ( retention ms < 0l ) { throw new illegal argument exception ( " retention period cannot be negative " ) ; } final string window size error message prefix = prepare millis check fail msg prefix ( window size , " window size " ) ; final long window size ms = validate millisecond duration ( window size , window size error message prefix ) ; if ( window size ms < 0l ) { throw new illegal argument exception ( " window size cannot be negative " ) ; } if ( window size ms > retention ms ) { throw new illegal argument exception ( " the retention period of the window store " + name + " must be no smaller than its window size got size = [ " + window size + " ] , retention = [ " + retention period + " ] " ) ; } return new in memory window bytes store supplier ( name , retention ms , window size ms , retain duplicates ) ; }


int alloc arrays ( ) { preconditions check state ( needs alloc arrays ( ) , " arrays already allocated " ) ; int expected size = metadata ; int buckets = compact hashing table size ( expected size ) ; this table = compact hashing create table ( buckets ) ; set hash table mask ( buckets - 1 ) ; this entries = new int [ expected size ] ; this keys = new object [ expected size ] ; this values = new object [ expected size ] ; return expected size ; }


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 map < string , boolean > get indirect map ( ) { return indirect map ; }


this function returns a md 5 hash of a file

public static string get file m d 5 ( file file ) throws i o exception { return m d 5 file utils compute md 5 for file ( file ) to string ( ) ; }


public get soap authentication response soap authentication request ( @ request payload final get soap authentication request request ) { val response = new get soap authentication response ( ) ; response set username ( " cas " ) ; response set status ( http status ok value ( ) ) ; response set message ( " test cas authentication " ) ; val map = new map item type ( ) ; map set key ( " given name " ) ; map set value ( " cas " ) ; response get attributes ( ) add all ( collection utils wrap ( map ) ) ; return response ; }


add the given header value ( s ) under the given name

b header ( string header name , string header values ) ;


returns the back pressure level as a string

private static job vertex back pressure info vertex back pressure level get back pressure level ( double back pressure ratio ) { if ( back pressure ratio < = 0 10 ) { return job vertex back pressure info vertex back pressure level ok ; } else if ( back pressure ratio < = 0 5 ) { return job vertex back pressure info vertex back pressure level low ; } else { return job vertex back pressure info vertex back pressure level high ; } }


sets the default { @ link authenticator } class to use when an { @ link authenticated u r l } instance is created without specifying an authenticator

public static void set default authenticator ( class < ? extends authenticator > authenticator ) { default authenticator = authenticator ; }


sets custom { @ link bitmap displayer displayer } for image loading task default value - { @ link default configuration factory # create bitmap displayer ( ) }

public builder displayer ( bitmap displayer displayer ) { if ( displayer = = null ) throw new illegal argument exception ( " displayer can ' t be null " ) ; this displayer = displayer ; return this ; }


public void set ( int n , entry entry ) { set 0 ( n , entry ) ; }


public docking action if get action ( ) { return tool bar action ; }


instantiates the { @ link restart backoff time strategy }

restart backoff time strategy create ( ) ;


returns true iff { @ code target } is a { @ code test } or { @ code test suite }

public static boolean is test or test suite rule ( target target ) { return is test rule ( target ) | | is test suite rule ( target ) ; }


returns a new modify kind set with the union of the other modify kind set

public modify kind set union ( modify kind set other ) { return union ( this , other ) ; }


public int get value ( ) { return this value ; }


public void prefix array test ( ) { / / todo : test prefix array }


this test verifies that the output is reasonable for a simple , non - nested query

public void test simple match ( ) throws exception { create index ( " test " ) ; int num docs = random int between ( 100 , 150 ) ; index request builder [ ] docs = new index request builder [ num docs ] ; for ( int i = 0 ; i < num docs ; i + + ) { docs [ i ] = client ( ) prepare index ( " test " ) set id ( string value of ( i ) ) set source ( " field 1 " , english int to english ( i ) , " field 2 " , i ) ; } index random ( true , docs ) ; ensure green ( ) ; query builder q = query builders match query ( " field 1 " , " one " ) ; search response resp = client ( ) prepare search ( ) set query ( q ) set profile ( true ) set search type ( search type query then fetch ) get ( ) ; map < string , profile shard result > p = resp get profile results ( ) ; assert not null ( p ) ; assert that ( " profile response should not be an empty array " , resp get profile results ( ) size ( ) , not ( 0 ) ) ; for ( map entry < string , profile shard result > shard result : resp get profile results ( ) entry set ( ) ) { for ( query profile shard result search profiles : shard result get value ( ) get query profile results ( ) ) { for ( profile result result : search profiles get query results ( ) ) { assert equals ( result get query name ( ) , " term query " ) ; assert equals ( result get lucene description ( ) , " field 1 : one " ) ; assert that ( result get time ( ) , greater than ( 0l ) ) ; assert not null ( result get time breakdown ( ) ) ; } collector result result = search profiles get collector result ( ) ; assert that ( result get name ( ) , is ( not ( empty or null string ( ) ) ) ) ; assert that ( result get time ( ) , greater than ( 0l ) ) ; } } }


returns { @ code true } if response has been truncated , usually if it is over 512 bytes


tests regular navigable set behavior of synchronized navigable set ( tree set ) ; does not test the fact that it ' s synchronized

public test tests for synchronized navigable set ( ) { return navigable set test suite builder using ( new test string sorted set generator ( ) { @ override public sorted set < string > create ( string [ ] elements ) { navigable set < string > delegate = new tree set < > ( minimal collection of ( elements ) ) ; return collections synchronized navigable set ( delegate ) ; } } ) named ( " synchronized navigable set / tree set , natural " ) with features ( set feature general purpose , collection feature serializable , collection feature known order , collection feature fails fast on concurrent modification , collection size any ) suppressing ( suppress for synchronized navigable set ( ) ) create test suite ( ) ; }


@ test public void conditional miss updates cache ( ) throws exception { server enqueue ( new mock response ( ) add header ( " e tag : v 1 " ) set body ( " a " ) ) ; server enqueue ( new mock response ( ) set response code ( http u r l connection http not modified ) ) ; server enqueue ( new mock response ( ) add header ( " e tag : v 2 " ) set body ( " b " ) ) ; server enqueue ( new mock response ( ) set response code ( http u r l connection http not modified ) ) ; http url url = server url ( " / " ) ; assert that ( get ( url ) body ( ) string ( ) ) is equal to ( " a " ) ; assert that ( get ( url ) body ( ) string ( ) ) is equal to ( " a " ) ; assert that ( get ( url ) body ( ) string ( ) ) is equal to ( " b " ) ; assert that ( get ( url ) body ( ) string ( ) ) is equal to ( " b " ) ; assert that ( server take request ( ) get header ( " if - none - match " ) ) is null ( ) ; assert that ( server take request ( ) get header ( " if - none - match " ) ) is equal to ( " v 1 " ) ; assert that ( server take request ( ) get header ( " if - none - match " ) ) is equal to ( " v 1 " ) ; assert that ( server take request ( ) get header ( " if - none - match " ) ) is equal to ( " v 2 " ) ; }


return the domain for cookies created by this generator , if any

public string get cookie domain ( ) { return this cookie domain ; }


get a remote iterator to the open files list managed by name node

public remote iterator < open file entry > list open files ( ) throws i o exception { check open ( ) ; return list open files ( enum set of ( open files type all open files ) , open files iterator filter path default ) ; }


default void on load started ( int window index , @ nullable media period id media period id , load event info load event info , media load data media load data ) { }


the delta iteration meta operator cannot have broadcast inputs this method always throws an exception

public void set broadcast variable ( string name , operator < ? > root ) { throw new unsupported operation exception ( " the delta iteration meta operator cannot have broadcast inputs " ) ; }


sets whether to enable debug mode ( e g to print debugging messages )

public command line builder set use debug mode ( boolean use debug mode ) { this use debug mode = use debug mode ; return this ; }


create an lsda action table from the bytes at < code > address < code > < br > note : this method must get called before any of the " get " methods

public void create ( address address , address max address ) { if ( address = = null ) { throw new illegal argument exception ( " action record ' s address cannot be null " ) ; } if ( monitor is cancelled ( ) ) { return ; } table address = address ; monitor set message ( " creating lsda action table " ) ; l s d a action record rec = null ; while ( address compare to ( max address ) < = 0 ) { rec = new l s d a action record ( monitor , program , region , this ) ; rec create ( address ) ; records add ( rec ) ; address = rec get next address ( ) ; } next address = address ; set comment cmd comment cmd = new set comment cmd ( table address , code unit plate comment , " ( lsda ) action table " ) ; comment cmd apply to ( program ) ; }


returns the default value for this setting

public t get default ( settings settings ) { return parser apply ( get default raw ( settings ) ) ; }


public void map map of string test ( ) { / / todo : test map map of string }


resolve and return the { @ code method } equivalent to : { @ code named ( method name ) build ( ) method ( ) }

public method resolve method ( string method name ) { return named ( method name ) build ( ) method ( ) ; }


public iterator < t > get tasks ( ) { return tasks values ( ) iterator ( ) ; }


is a state transition valid ? there are no checks for current = = proposed as that is considered a non - transition using an array kills off all branch misprediction costs , at the expense of cache line misses

public static boolean is valid state transition ( service state current , service state proposed ) { boolean [ ] row = statemap [ current get value ( ) ] ; return row [ proposed get value ( ) ] ; }


public void refresh ( ) { log info ( " clearing user to groups map cache " ) ; try { impl cache groups refresh ( ) ; } catch ( i o exception e ) { log warn ( " error refreshing groups cache " , e ) ; } cache invalidate all ( ) ; if ( is negative cache enabled ( ) ) { negative cache clear ( ) ; } }


public int get highlight thickness ( ) { return highlight thickness ; }


returns if we are building external runfiles symlinks using the old - style structure

public boolean legacy external runfiles ( ) { return options legacy external runfiles ; }


public i ttl time provider get time provider ( ) { return time provider ; }


get the { @ link cluster name } associated with all of the nodes

public cluster name get cluster name ( ) { return cluster name ; }


public void put job ( put job action request request , analysis registry analysis registry , cluster state state , action listener < put job action response > action listener ) throws i o exception { job builder job builder = request get job builder ( ) ; job builder validate analysis limits and set defaults ( max model memory limit ) ; job builder validate model snapshot retention settings and set defaults ( ) ; validate categorization analyzer ( job builder , analysis registry ) ; job job = job builder build ( new date ( ) ) ; if ( job get data description ( ) ! = null & & job get data description ( ) get format ( ) = = data description data format delimited ) { deprecation logger deprecate ( " ml create job delimited data " , " creating jobs with delimited data format is deprecated please use xcontent instead " ) ; } / / check for the job in the cluster state first ml metadata current ml metadata = ml metadata get ml metadata ( state ) ; if ( current ml metadata get jobs ( ) contains key ( job get id ( ) ) ) { action listener on failure ( exceptions helper job already exists ( job get id ( ) ) ) ; return ; } action listener < boolean > put job listener = new action listener < > ( ) { @ override public void on response ( boolean mappings updated ) { job config provider put job ( job , action listener wrap ( response - > { auditor info ( job get id ( ) , messages get message ( messages job audit created ) ) ; action listener on response ( new put job action response ( job ) ) ; } , action listener : : on failure ) ) ; } @ override public void on failure ( exception e ) { if ( exceptions helper unwrap cause ( e ) instanceof illegal argument exception ) { / / the underlying error differs depending on which way around the clashing fields are seen matcher matcher = pattern compile ( " can ' t merge a non object mapping \ \ [ ( * ) \ \ ] with an object mapping " ) matcher ( e get message ( ) ) ; if ( matcher matches ( ) ) { string msg = messages get message ( messages job config mapping type clash , matcher group ( 1 ) ) ; action listener on failure ( exceptions helper bad request exception ( msg , e ) ) ; return ; } } action listener on failure ( e ) ; } } ; action listener < boolean > add doc mappings listener = action listener wrap ( indices created - > { if ( state = = null ) { logger warn ( " cannot update doc mapping because cluster state = = null " ) ; put job listener on response ( false ) ; return ; } elasticsearch mappings add doc mapping if missing ( ml config index index name ( ) , ml config index : : mapping , client , state , put job listener ) ; } , put job listener : : on failure ) ; action listener < list < string > > check for left over docs = action listener wrap ( matched ids - > { if ( matched ids is empty ( ) ) { job results provider create job result index ( job , state , add doc mappings listener ) ; } else { / / a job has the same id as one of the group names / / error with the first in the list action listener on failure ( new resource already exists exception ( messages get message ( messages job and group names must be unique , matched ids get ( 0 ) ) ) ) ; } } , action listener : : on failure ) ; action listener < boolean > check no jobs with group id = action listener wrap ( group exists - > { if ( group exists ) { action listener on failure ( new resource already exists exception ( messages get message ( messages job and group names must be unique , job get id ( ) ) ) ) ; return ; } if ( job get groups ( ) is empty ( ) ) { check for left over docs on response ( collections empty list ( ) ) ; } else { job config provider job id matches ( job get groups ( ) , check for left over docs ) ; } } , action listener : : on failure ) ; action listener < boolean > check no group with the job id = action listener wrap ( ok - > job config provider group exists ( job get id ( ) , check no jobs with group id ) , action listener : : on failure ) ; job config provider job exists ( job get id ( ) , false , action listener wrap ( job exists - > { if ( job exists ) { action listener on failure ( exceptions helper job already exists ( job get id ( ) ) ) ; } else { job results provider check for left over documents ( job , check no group with the job id ) ; } } , action listener : : on failure ) ) ; }


whether to ignore requests with path extension that cannot be resolved to any media type setting this to { @ code false } will result in an { @ code http media type not acceptable exception } if there is no match by default this is set to { @ code true }

public void set ignore unknown path extensions ( boolean ignore ) { this ignore unknown path extensions = ignore ; }


returns the index of the key if already present , else - ( index + 1 ) for the next empty index this can be overridden in this pacakge to compare for equality differently than { @ link object # equals ( object ) }

int locate key ( k key ) { if ( key = = null ) throw new illegal argument exception ( " key cannot be null " ) ; k [ ] key table = this key table ; for ( int i = place ( key ) ; ; i = i + 1 & mask ) { k other = key table [ i ] ; if ( other = = null ) return - ( i + 1 ) ; / / empty space is available if ( other equals ( key ) ) return i ; / / same key was found } }


the request from clients to get a report of applications matching the giving application types in the cluster from the < code > resource manager < code >

public static get applications request new instance ( applications request scope scope , set < string > users , set < string > queues , set < string > application types , set < string > application tags , enum set < yarn application state > application states , range < long > start range , range < long > finish range , long limit ) { get applications request request = records new record ( get applications request class ) ; if ( scope ! = null ) { request set scope ( scope ) ; } request set users ( users ) ; request set queues ( queues ) ; request set application types ( application types ) ; request set application tags ( application tags ) ; request set application states ( application states ) ; if ( start range ! = null ) { request set start range ( start range get minimum ( ) , start range get maximum ( ) ) ; } if ( finish range ! = null ) { request set finish range ( finish range get minimum ( ) , finish range get maximum ( ) ) ; } if ( limit ! = null ) { request set limit ( limit ) ; } return request ; }


private static void write ( output stream out , int offset , int length ) throws i o exception { final byte [ ] bytes = new byte [ length ] ; for ( int i = 0 ; i < length ; i + + ) { bytes [ i ] = ( byte ) ( offset + i ) ; } out write ( bytes ) ; }


adds the specified options and builds the application note that any options set in build app ( ) are sticky for subsequent calls to build app ( ) from the same test method

private build result build app ( string request args ) throws exception { add options ( request args ) ; return build target ( " / / pkg : hello " ) ; }


get the starting address for this code unit

public address get min address ( ) { return address ; }


determine if this record ' s schema is compatible with the specified schema this check factors column count and column field types only

public boolean has same schema ( schema schema ) { if ( field values length ! = schema get field count ( ) ) { return false ; } if ( ! key is same type ( schema get key field type ( ) ) ) { return false ; } field [ ] other fields = schema get fields ( ) ; for ( int i = 0 ; i < field values length ; i + + ) { if ( ! field values [ i ] is same type ( other fields [ i ] ) ) { return false ; } } return true ; }


returns the password provided by the client during saslplain authentication

public char [ ] password ( ) { return password ; }


try to add { @ code key } return its newly allocated id if it wasn ' t in the hash table yet , or { @ code - 1 - id } if it was already present in the hash table

public long add ( long key 1 , long key 2 ) { if ( size > = max size ) { assert size = = max size ; grow ( ) ; } assert size < max size ; return set ( key 1 , key 2 , size ) ; }


public boolean is root ( ) { return get root ( ) = = this ; }


execute the given sql script using default settings for statement separators , comment delimiters , and exception handling flags statement separators and comments will be removed before executing individual statements within the supplied script warning : this method does not release the provided { @ link connection }

public static mono < void > execute sql script ( connection connection , encoded resource resource ) throws script exception { return execute sql script ( connection , resource , default data buffer factory shared instance , false , false , default comment prefix , default statement separator , default block comment start delimiter , default block comment end delimiter ) ; }


returns the globally unique identifier of this { @ link channel }


load directory diff list for a directory with snapshot feature

private void load directory diff list ( input stream in , i node directory dir , int size , final list < i node reference > ref list ) throws i o exception { if ( ! dir is with snapshot ( ) ) { dir add snapshot feature ( null ) ; } directory diff list diffs = dir get diffs ( ) ; final loader context state = parent get loader context ( ) ; for ( int i = 0 ; i < size ; i + + ) { / / load a directory diff snapshot diff section directory diff diff in pb = snapshot diff section directory diff parse delimited from ( in ) ; final int snapshot id = diff in pb get snapshot id ( ) ; final snapshot snapshot = snapshot map get ( snapshot id ) ; int children size = diff in pb get children size ( ) ; boolean use root = diff in pb get is snapshot root ( ) ; i node directory attributes copy = null ; if ( use root ) { copy = snapshot get root ( ) ; } else if ( diff in pb has snapshot copy ( ) ) { i node section i node directory dir copy in pb = diff in pb get snapshot copy ( ) ; final byte [ ] name = diff in pb get name ( ) to byte array ( ) ; permission status permission = load permission ( dir copy in pb get permission ( ) , state get string table ( ) ) ; acl feature acl = null ; if ( dir copy in pb has acl ( ) ) { int [ ] entries = acl entry status format to int ( f s image format p b i node loader load acl entries ( dir copy in pb get acl ( ) , state get string table ( ) ) ) ; acl = new acl feature ( entries ) ; } x attr feature x attrs = null ; if ( dir copy in pb has x attrs ( ) ) { x attrs = new x attr feature ( f s image format p b i node loader load x attrs ( dir copy in pb get x attrs ( ) , state get string table ( ) ) ) ; } long mod time = dir copy in pb get modification time ( ) ; boolean no quota = dir copy in pb get ns quota ( ) = = - 1 & & dir copy in pb get ds quota ( ) = = - 1 & & ( ! dir copy in pb has type quotas ( ) ) ; if ( no quota ) { copy = new i node directory attributes snapshot copy ( name , permission , acl , mod time , x attrs ) ; } else { enum counters < storage type > type quotas = null ; if ( dir copy in pb has type quotas ( ) ) { immutable list < quota by storage type entry > qes = f s image format p b i node loader load quota by storage type entries ( dir copy in pb get type quotas ( ) ) ; type quotas = new enum counters < storage type > ( storage type class , hdfs constants quota reset ) ; for ( quota by storage type entry qe : qes ) { if ( qe get quota ( ) > = 0 & & qe get storage type ( ) ! = null & & qe get storage type ( ) support type quota ( ) ) { type quotas set ( qe get storage type ( ) , qe get quota ( ) ) ; } } } copy = new i node directory attributes copy with quota ( name , permission , acl , mod time , dir copy in pb get ns quota ( ) , dir copy in pb get ds quota ( ) , type quotas , x attrs ) ; } } / / load created list list < i node > clist = load created list ( in , dir , diff in pb get created list size ( ) ) ; / / load deleted list list < i node > dlist = load deleted list ( ref list , in , dir , diff in pb get deleted i node list ( ) , diff in pb get deleted i node ref list ( ) ) ; / / create the directory diff directory diff diff = new directory diff ( snapshot id , copy , null , children size , clist , dlist , use root ) ; diffs add first ( diff ) ; } }


get array length elements from the set , and put them into the array

public t [ ] poll to array ( t [ ] array ) { int current index = 0 ; linked element < t > current = null ; if ( array length = = 0 ) { return array ; } if ( array length > size ) { array = ( t [ ] ) java lang reflect array new instance ( array get class ( ) get component type ( ) , size ) ; } / / do fast polling if the entire set needs to be fetched if ( array length = = size ) { for ( int i = 0 ; i < entries length ; i + + ) { current = entries [ i ] ; while ( current ! = null ) { array [ current index + + ] = current element ; current = current next ; } } this clear ( ) ; return array ; } boolean done = false ; int current bucket index = 0 ; while ( ! done ) { current = entries [ current bucket index ] ; while ( current ! = null ) { array [ current index + + ] = current element ; current = current next ; entries [ current bucket index ] = current ; size - - ; modification + + ; if ( current index = = array length ) { done = true ; break ; } } current bucket index + + ; } shrink if necessary ( ) ; return array ; }


rethrows the throwable if it is a fatal exception or calls { @ link # on error ( throwable ) }

protected final void fail ( throwable t ) { exceptions throw if fatal ( t ) ; upstream dispose ( ) ; on error ( t ) ; }


static path qualify ( final o b s file system owner , final path path ) { return path make qualified ( owner get uri ( ) , owner get working directory ( ) ) ; }


this match method will go through all the provided matchers and call their match method , if all match we return true

public boolean match ( variable context variables ) { for ( mapping rule matcher matcher : matchers ) { if ( ! matcher match ( variables ) ) { return false ; } } return true ; }


returns the min value of the range used by this constraint

public t get min value ( ) { return min value ; }


private void reset ( ) { ip list = ip list reload ( ) ; update cache expiry time ( ) ; }


return the configured { @ link web session store }

public web session store get session store ( ) { return this session store ; }


skips checks for existing keys , doesn ' t increment size

private void put resize ( k key , int value ) { k [ ] key table = this key table ; for ( int i = place ( key ) ; ; i = ( i + 1 ) & mask ) { if ( key table [ i ] = = null ) { key table [ i ] = key ; value table [ i ] = value ; return ; } } }


indicates the ordinal of the component which has been added , updated or cleared

void component changed ( int ordinal ) ;


initiate a duration tracking operation by creatingreturning an object whose { @ code close ( ) } call will update the statistics the expected use is within a try - with - resources clause

default duration tracker track duration ( string key ) { return track duration ( key , 1 ) ; }


returns the default block tolerance if the plan does not have value of tolerance specified

private long get block tolerance percentage ( disk balancer work item item ) { return item get tolerance percent ( ) < = 0 ? this block tolerance : item get tolerance percent ( ) ; }


assert that an array contains no { @ code null } elements

public static void no null elements ( @ nullable object [ ] array ) { no null elements ( array , " [ assertion failed ] - this array must not contain any null elements " ) ; }


total wall time spent running the critical path actions

public duration total time ( ) { return total time ; }


sets the matrix to the given matrix as a float array the float array must have at least 9 elements ; the first 9 will be copied

public matrix 3 set ( float [ ] values ) { system arraycopy ( values , 0 , val , 0 , val length ) ; return this ; }


returns a hash code for the elements of the given array

public static int hash code ( int [ ] array , int size ) { int hash code = 0 ; for ( int index = 0 ; index < size ; index + + ) { hash code ^ = array [ index ] ; } return hash code ; }


see { @ link media session compat callback # on prepare from media id ( string , bundle ) }

void on prepare from media id ( string media id , boolean play when ready , @ nullable bundle extras ) ;


create a script based builder ( either shell or batch file ) depending on platform

private builder create script builder ( string script ) { return functions is windows ( ) ? new batch file ( script ) : new shell ( script ) ; }


determine whether the given interface is a well - known internal language interface and therefore not to be considered as a reasonable proxy interface if no reasonable proxy interface is found for a given bean , it will get proxied with its full target class , assuming that as the user ' s intention

protected boolean is internal language interface ( class < ? > ifc ) { return ( ifc get name ( ) equals ( " groovy lang groovy object " ) | | ifc get name ( ) ends with ( " cglib proxy factory " ) | | ifc get name ( ) ends with ( " bytebuddy mock access " ) ) ; }


validates the output records data with input as xml containing whitespaces fix : issue # 1095 : : open xml file from url generates lots of empty lines

public void process records from xml with white spaces before tags test ( ) throws i o exception { load data ( get xml data from file ( " xml - sample - format - 1 xml " ) ) ; create xml parser ( ) ; parser skip ( ) ; try { sut process record wrapper ( project , parser , column group , false , false , false ) ; } catch ( exception e ) { assert fail ( " failed to parse records from the given xml data reason : " + e get message ( ) , e ) ; } assert assert not null ( project rows , " checks the record count of project " ) ; assert assert equals ( project rows size ( ) , 3 , " checks the number of records parsed from xml " ) ; row row = project rows get ( 0 ) ; assert assert not null ( row , " checks the row instance with index ' 0 ' " ) ; assert assert equals ( row cells size ( ) , 4 , " checks the row cells count " ) ; assert assert not null ( row get cell ( 1 ) , " checks the cell instance at index ' 1 ' " ) ; assert assert equals ( row get cell ( 1 ) value , " author 1 " , " checks the value for ' author - name ' " ) ; assert assert not null ( row get cell ( 2 ) , " checks the cell instance at index ' 2 ' " ) ; assert assert equals ( row get cell ( 2 ) value , " a date " , " checks the value for ' author - dob ' " ) ; }


register a listener that will be called when this model visibility has changed the listener will contribute to this model ' s hash code state per the { @ link com airbnb epoxy epoxy attribute option # do not hash } rules

public r layout in view model annotation works view model on visibility changed ( on model visibility changed listener < r layout in view model annotation works view model , r layout in view model annotation works view > listener ) { on mutation ( ) ; this on model visibility changed listener epoxy generated model = listener ; return this ; }


unexport the registered rmi object , logging any exception that arises

private void unexport object silently ( ) { try { unicast remote object unexport object ( this exported object , true ) ; } catch ( no such object exception ex ) { if ( logger is info enabled ( ) ) { logger info ( " rmi object for service ' " + this service name + " ' is not exported anymore " , ex ) ; } } }


wait for all the internal blocks of the block groups of the given file to be reported

public static void wait block groups reported ( distributed file system fs , string src , int num dead d ns ) throws exception { boolean success ; final int attempts = 40 ; int count = 0 ; final erasure coding policy ec policy = fs get erasure coding policy ( new path ( src ) ) ; do { success = true ; count + + ; located blocks lbs = fs get client ( ) get located blocks ( src , 0 ) ; for ( located block lb : lbs get located blocks ( ) ) { short expected = ( short ) ( get real total block num ( ( int ) lb get block size ( ) , ec policy ) - num dead d ns ) ; int reported = lb get locations ( ) length ; if ( reported < expected ) { success = false ; log info ( " block group " + lb get block ( ) + " of file " + src + " has reported internal blocks " + reported + " ( desired " + expected + " ) ; locations " + joiner on ( ' ' ) join ( lb get locations ( ) ) ) ; thread sleep ( 1000 ) ; break ; } } if ( success ) { log info ( " all block groups of file " + src + " verified to have all internal blocks " ) ; } } while ( ! success & & count < attempts ) ; if ( count = = attempts ) { throw new timeout exception ( " timed out waiting for " + src + " to have all the internal blocks " ) ; } }


find the fields constant that matches field id , or null if its not found

public static fields find by thrift id ( int field id ) { switch ( field id ) { case 1 : / / name return name ; case 2 : / / uploaded jar location return uploaded jar location ; case 3 : / / json conf return json conf ; case 4 : / / topology return topology ; default : return null ; } }


match all classes that all of the given class filters match

public static class filter intersection ( class filter [ ] class filters ) { assert not empty ( class filters , " class filter array must not be empty " ) ; return new intersection class filter ( class filters ) ; }


return the default value of the property

public string to default value ( schema p ) { if ( model utils is boolean schema ( p ) ) { if ( p get default ( ) ! = null ) { if ( p get default ( ) to string ( ) equals ignore case ( " false " ) ) return " false " ; else return " true " ; } } else if ( model utils is date schema ( p ) ) { / / todo } else if ( model utils is date time schema ( p ) ) { / / todo } else if ( model utils is number schema ( p ) ) { if ( p get default ( ) ! = null ) { return p get default ( ) to string ( ) ; } } else if ( model utils is integer schema ( p ) ) { if ( p get default ( ) ! = null ) { return p get default ( ) to string ( ) ; } } else if ( model utils is string schema ( p ) ) { if ( p get default ( ) ! = null ) { return " ' " + ( string ) p get default ( ) + " ' " ; } } return null ; }


returns a string that repeats the base string n times

public static string repeat ( string str , int repeat ) { return encoding utils repeat ( str , repeat ) ; }


reports whether the given repository is the special builtins pseudo - repository

static boolean is builtins repo ( repository name repo ) { / / use string equals ( ) , not repository name equals ( ) , to force case sensitivity return repo get name ( ) equals ( builtins name ) ; }


inform listeners that node is being removed

public static void fire on deleted ( @ non null node node ) { for ( node listener nl : all ( ) ) { try { nl on deleted ( node ) ; } catch ( throwable ex ) { logger log ( level warning , " listener invocation failed " , ex ) ; } } }


remove any index with the same index key but differing index options in anticipation of recreating it

private static void remove differing index if any ( final mongo collection collection , final index index ) { val indexes = ( list indexes iterable < document > ) collection list indexes ( ) ; var index exists with different options = false ; val index keys = index get index keys ( ) ; val index options = index get index options ( ) ; for ( val existing index : indexes ) { val key matches = existing index get ( " key " ) equals ( index keys ) ; val options match = index options entry set ( ) stream ( ) all match ( entry - > entry get value ( ) equals ( existing index get ( entry get key ( ) ) ) ) ; val no extra options = existing index key set ( ) stream ( ) all match ( key - > mongo index keys contains ( key ) | | index options key set ( ) contains ( key ) ) ; index exists with different options | = key matches & & ! ( options match & & no extra options ) ; } if ( index exists with different options ) { logger debug ( " removing mongo db index [ { } ] from [ { } ] " , index keys , collection get namespace ( ) ) ; collection drop index ( index keys ) ; } }


public boolean equals ( object other ) { if ( this = = other ) { / * * since externally - visible types are interned , this check * helps weed out some easy cases * / return true ; } if ( ! ( other instanceof type ) ) { return false ; } return descriptor equals ( ( ( type ) other ) descriptor ) ; }


whether url lookups should always use the full path within the current web application context , i e within { @ link javax servlet servlet context # get context path ( ) } if set to { @ literal false } the path within the current servlet mapping is used instead if applicable ( i e in the case of a prefix based servlet mapping such as " my servlet " ) by default this is set to " false "

public void set always use full path ( boolean always use full path ) { check read only ( ) ; this always use full path = always use full path ; }


validates the implementation of seekable seek to new source

public void test seek to new source ( ) throws exception { path test path = new path ( test file prefix + " test seek to new source " ) ; assume huge file exists ( test path ) ; try ( f s data input stream input stream = this get file system ( ) open ( test path ) ) { assert false ( input stream seek to new source ( 0 ) ) ; } }


public string type name ( ) { return " field " ; }


construct grouper group attribute this is the name of every individual group attribute transformed into a cas attribute value

public static string get grouper group attribute ( final grouper group field group field , final ws group group ) { switch ( group field ) { case display extension : return group get display extension ( ) ; case display name : return group get display name ( ) ; case extension : return group get extension ( ) ; case name : default : return group get name ( ) ; } }


test case for data corruption during data transmission for createwrite to recover from corruption while writing , at least two replicas are needed

public void test corruption during wrt ( ) throws exception { configuration conf = new hdfs configuration ( ) ; / / set short retry timeouts so this test runs faster conf set int ( hdfs client config keys retry window base key , 10 ) ; mini d f s cluster cluster = null ; try { cluster = new mini d f s cluster builder ( conf ) num data nodes ( 10 ) build ( ) ; cluster wait active ( ) ; file system fs = cluster get file system ( ) ; path file = new path ( " / test corruption file " ) ; f s data output stream out = fs create ( file , true , 8192 , ( short ) 3 , ( long ) ( 128 * 1024 * 1024 ) ) ; byte [ ] data = new byte [ 65536 ] ; for ( int i = 0 ; i < 65536 ; i + + ) { data [ i ] = ( byte ) ( i % 256 ) ; } for ( int i = 0 ; i < 5 ; i + + ) { out write ( data , 0 , 65535 ) ; } out hflush ( ) ; / / corrupt the packet once mockito when ( fault injector corrupt packet ( ) ) then return ( true , false ) ; mockito when ( fault injector uncorrupt packet ( ) ) then return ( true , false ) ; for ( int i = 0 ; i < 5 ; i + + ) { out write ( data , 0 , 65535 ) ; } out close ( ) ; / / read should succeed f s data input stream in = fs open ( file ) ; for ( int c ; ( c = in read ( ) ) ! = - 1 ; ) ; in close ( ) ; / / test the retry limit out = fs create ( file , true , 8192 , ( short ) 3 , ( long ) ( 128 * 1024 * 1024 ) ) ; / / corrupt the packet once and never fix it mockito when ( fault injector corrupt packet ( ) ) then return ( true , false ) ; mockito when ( fault injector uncorrupt packet ( ) ) then return ( false ) ; / / the client should give up pipeline reconstruction after retries try { for ( int i = 0 ; i < 5 ; i + + ) { out write ( data , 0 , 65535 ) ; } out close ( ) ; fail ( " write did not fail " ) ; } catch ( i o exception ioe ) { / / we should get an ioe d f s client log info ( " got expected exception " , ioe ) ; } } finally { if ( cluster ! = null ) { cluster shutdown ( ) ; } mockito when ( fault injector corrupt packet ( ) ) then return ( false ) ; mockito when ( fault injector uncorrupt packet ( ) ) then return ( false ) ; } }


called when the surface is created or recreated called when the rendering thread starts and whenever the egl context is lost the egl context will typically be lost when the android device awakes after going to sleep since this method is called at the beginning of rendering , as well as every time the egl context is lost , this method is a convenient place to put code to create resources that need to be created when the rendering starts , and that need to be recreated when the egl context is lost textures are an example of a resource that you might want to create here note that when the egl context is lost , all open g l resources associated with that context will be automatically deleted you do not need to call the corresponding " gl delete " methods such as gl delete textures to manually delete these lost resources

void on surface created ( gl10 gl , e g l config config ) ;


public static void async http post ( string url , list < string > headers , map < string , string > param values , callback < string > callback ) throws exception { async http request ( url , headers , param values , callback , http method post ) ; }


public boolean add ( vertex v ) { return this vertices ( ) add ( v ) ; }


finds the record that is the closest match to the specified key

public synchronized writable comparable get closest ( writable comparable key , writable val , final boolean before ) throws i o exception { int c = seek internal ( key , before ) ; / / if we didn ' t get an exact match , and we ended up in the wrong / / direction relative to the query key , return null since we / / must be at the beginning or end of the file if ( ( ! before & & c > 0 ) | | ( before & & c < 0 ) ) { return null ; } data get current value ( val ) ; return next key ; }


fence any previous writers , and obtain a unique epoch number for write - access to the journal nodes

map < async logger , new epoch response proto > create new unique epoch ( ) throws i o exception { preconditions check state ( ! loggers is epoch established ( ) , " epoch already created " ) ; map < async logger , get journal state response proto > last promises = loggers wait for write quorum ( loggers get journal state ( ) , get journal state timeout ms , " get journal state ( ) " ) ; long max promised = long min value ; for ( get journal state response proto resp : last promises values ( ) ) { max promised = math max ( max promised , resp get last promised epoch ( ) ) ; } assert max promised > = 0 ; long my epoch = max promised + 1 ; map < async logger , new epoch response proto > resps = loggers wait for write quorum ( loggers new epoch ( ns info , my epoch ) , new epoch timeout ms , " new epoch ( " + my epoch + " ) " ) ; loggers set epoch ( my epoch ) ; return resps ; }


build an instance of { @ code websocket server spec } that reflects the current configuration this can be used to check the configured parameters except for sub - protocols which depend on the { @ link web socket handler } that is used for a given upgrade

public websocket server spec get websocket server spec ( ) { return build spec ( null ) ; }


public void test big cat all of ( ) { / / todo : test big cat all of }


extract the si m p session attributes from the given message and wrap them in a { @ link simp attributes } instance

public static simp attributes from message ( message < ? > message ) { assert not null ( message , " message must not be null " ) ; message headers headers = message get headers ( ) ; string session id = simp message header accessor get session id ( headers ) ; map < string , object > session attributes = simp message header accessor get session attributes ( headers ) ; if ( session id = = null ) { throw new illegal state exception ( " no session id in " + message ) ; } if ( session attributes = = null ) { throw new illegal state exception ( " no session attributes in " + message ) ; } return new simp attributes ( session id , session attributes ) ; }


returns the overall score ( higher is better )

public abstract float get overall score ( ) ;


to simplify computation , use weights instead of fair shares to calculate fair share usage

private int compare fair share usage ( schedulable s 1 , schedulable s 2 , resource resource usage 1 , resource resource usage 2 ) { double weight 1 = s 1 get weight ( ) ; double weight 2 = s 2 get weight ( ) ; double use to weight ratio 1 ; double use to weight ratio 2 ; if ( weight 1 > 0 0 & & weight 2 > 0 0 ) { use to weight ratio 1 = resource usage 1 get memory size ( ) / weight 1 ; use to weight ratio 2 = resource usage 2 get memory size ( ) / weight 2 ; } else if ( weight 1 = = weight 2 ) { / / either weight 1 or weight 2 equals to 0 / / if they have same weight , just compare usage use to weight ratio 1 = resource usage 1 get memory size ( ) ; use to weight ratio 2 = resource usage 2 get memory size ( ) ; } else { / / by setting use to weight ratios to negative weights , we give the / / zero - weight one less priority , so the non - zero weight one will / / be given slots use to weight ratio 1 = - weight 1 ; use to weight ratio 2 = - weight 2 ; } return ( int ) math signum ( use to weight ratio 1 - use to weight ratio 2 ) ; }


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


sets this block to have an instruction error

public void set instruction error ( instruction error instruction error type type , address intended instruction address , address conflict address , address flow from address , string message ) { if ( type = = instruction error type parse ) { throw new illegal argument exception ( " use set parse conflict for parse conflicts " ) ; } instruction error = new instruction error ( this , type , intended instruction address , conflict address , flow from address , message ) ; }


converts the given value to bytes see { @ link # put int ( byte [ ] , int ) }

default void get bytes ( int value , byte [ ] b , int offset ) { put int ( b , offset , value ) ; }


looks up the value mapped under the given key returns null if no value is mapped under this key

public v get ( k key ) { final int hash = hash ( key ) ; final int slot = index of ( hash ) ; / / search the chain from the slot for ( entry < k , v > entry = table [ slot ] ; entry ! = null ; entry = entry next ) { if ( entry hash code = = hash & & entry key equals ( key ) ) { return entry value ; } } / / not found return null ; }


sets the specified byte at the current { @ code writer index } and increases the { @ code writer index } by { @ code 1 } in this buffer the 24 high - order bits of the specified value are ignored


partitions are dropped when hive table layout handle is serialized

public optional < list < hive partition > > get partitions ( ) { return optional of nullable ( partitions ) ; }


checks if the state is { @ link # cancelled } or { @ link # interrupted }

boolean is cancelled ( ) { return ( get state ( ) & ( cancelled | interrupted ) ) ! = 0 ; }


creates a common information entry ( cie ) at < code > cie address < code > < br > note : this method must get called before any of the " get " methods

public void create ( address cie address ) throws memory access exception , exception handler frame exception { if ( cie address = = null | | monitor is cancelled ( ) ) { return ; } base address = cie address ; monitor set message ( " creating common information entries " ) ; address current address = cie address ; / / see if processing should stop due to the current length field = = 0 if ( program get memory ( ) get int ( current address ) = = 0 ) { mark end of frame ( current address ) ; end of frame = true ; return ; } / / note : the process method calls that follow are order dependent / / each one is passed the address of the field it will process and / / returns the next address after that field , which will then be / / used by the next field ' s process method / / create the cie length field current address = process cie length ( current address ) ; current address = process extended length ( current address ) ; / * create the cie fields & update the current address as you go * / current address = process cie id ( current address ) ; current address = process version ( current address ) ; current address = process augmentation string ( current address ) ; if ( version > = ( byte ) 4 ) { current address = process pointer size ( current address ) ; current address = process segment size ( current address ) ; } current address = process code align ( current address ) ; current address = process data align ( current address ) ; current address = process return addr register ( current address ) ; if ( is in debug frame ) { fde encoding = 0x 0 ; } else { current address = process augmentation info ( current address ) ; } / * * add initial instructions section and possible padding from remaining bytes * / if ( ! has ext length ) { if ( cur size < int length ) { current address = process initial instructions ( current address ) ; } } else { throw new exception handler frame exception ( " ext length is not completely implemented " ) ; } next address = current address ; }


get the platform plugins added in the version range

/ * package * / j s o n array get platform plugins for update ( version number from , version number to ) { jenkins jenkins = jenkins get ( ) ; j s o n array plugin categories = j s o n array from object ( get platform plugin list ( ) to string ( ) ) ; for ( iterator < ? > category iterator = plugin categories iterator ( ) ; category iterator has next ( ) ; ) { object category = category iterator next ( ) ; if ( category instanceof j s o n object ) { j s o n object cat = ( j s o n object ) category ; j s o n array plugins = cat get j s o n array ( " plugins " ) ; next plugin : for ( iterator < ? > plugin iterator = plugins iterator ( ) ; plugin iterator has next ( ) ; ) { object plugin data = plugin iterator next ( ) ; if ( plugin data instanceof j s o n object ) { j s o n object plugin = ( j s o n object ) plugin data ; if ( plugin has ( " added " ) ) { string since version = plugin get string ( " added " ) ; if ( since version ! = null ) { version number v = new version number ( since version ) ; if ( v compare to ( to ) < = 0 & & v compare to ( from ) > 0 ) { / / this plugin is valid , we ' ll leave " suggested " state / / to match the experience during install / / but only add it if it ' s currently uninstalled string plugin name = plugin get string ( " name " ) ; if ( null = = jenkins get plugin manager ( ) get plugin ( plugin name ) ) { / / also check that a compatible version exists in an update site boolean found compatible version = false ; for ( update site site : jenkins get update center ( ) get site list ( ) ) { update site plugin site plug = site get plugin ( plugin name ) ; if ( site plug ! = null & & ! site plug is for newer hudson ( ) & & ! site plug is for newer java ( ) & & ! site plug is needed dependencies for newer jenkins ( ) ) { found compatible version = true ; break ; } } if ( found compatible version ) { continue next plugin ; } } } } } } plugin iterator remove ( ) ; } if ( plugins is empty ( ) ) { category iterator remove ( ) ; } } } return plugin categories ; }


gets a new address set indicating all addresses of the indicated memory type in the specified program

public static address set get address set ( program program , boolean blocks with bytes ) { memory block [ ] mem blocks = program memory util get mem blocks ( program , blocks with bytes ) ; address set addr set = new address set ( ) ; for ( memory block block : mem blocks ) { addr set add ( block get start ( ) , block get end ( ) ) ; } return addr set ; }


adds a route to the given handler function that handles all http { @ code put } requests that match the given pattern and predicate for instance , the following example routes put requests for " user " that contain json to the { @ code edit user } method in { @ code user controller } : < pre class = " code " > router function & lt ; server response & gt ; route = router functions route ( ) put ( " user " , request predicates content type ( media type application json ) , user controller : : edit user ) build ( ) ;

builder put ( string pattern , request predicate predicate , handler function < server response > handler function ) ;


set the verify checksum flag this is only applicable if the corresponding filesystem supports checksums by default doesn ' t do anything

public void set verify checksum ( boolean verify checksum ) { / / doesn ' t do anything }


select a invoker using loadbalance policy < br > a ) firstly , select an invoker using loadbalance if this invoker is in previously selected list , or , if this invoker is unavailable , then continue step b ( reselect ) , otherwise return the first selected invoker < br > b ) reselection , the validation rule for reselection : selected > available this rule guarantees that the selected invoker has the minimum chance to be one in the previously selected list , and also guarantees this invoker is available

protected invoker < t > select ( load balance loadbalance , invocation invocation , list < invoker < t > > invokers , list < invoker < t > > selected ) throws rpc exception { if ( collection utils is empty ( invokers ) ) { return null ; } string method name = invocation = = null ? string utils empty string : invocation get method name ( ) ; boolean sticky = invokers get ( 0 ) get url ( ) get method parameter ( method name , cluster sticky key , default cluster sticky ) ; / / ignore overloaded method if ( sticky invoker ! = null & & ! invokers contains ( sticky invoker ) ) { sticky invoker = null ; } / / ignore concurrency problem if ( sticky & & sticky invoker ! = null & & ( selected = = null | | ! selected contains ( sticky invoker ) ) ) { if ( availablecheck & & sticky invoker is available ( ) ) { return sticky invoker ; } } invoker < t > invoker = do select ( loadbalance , invocation , invokers , selected ) ; if ( sticky ) { sticky invoker = invoker ; } return invoker ; }


save all the snapshottable directories and snapshots to fsimage

public void serialize snapshot section ( output stream out ) throws i o exception { snapshot manager sm = fsn get snapshot manager ( ) ; snapshot section builder b = snapshot section new builder ( ) set snapshot counter ( sm get snapshot counter ( ) ) set num snapshots ( sm get num snapshots ( ) ) ; final list < i node directory > snapshottables = sm get snapshottable dirs ( ) ; for ( i node directory sdir : snapshottables ) { b add snapshottable dir ( sdir get id ( ) ) ; } b build ( ) write delimited to ( out ) ; int i = 0 ; for ( i node directory sdir : snapshottables ) { for ( snapshot s : sdir get directory snapshottable feature ( ) get snapshot list ( ) ) { root sroot = s get root ( ) ; snapshot section snapshot builder sb = snapshot section snapshot new builder ( ) set snapshot id ( s get id ( ) ) ; i node section i node directory builder db = build i node directory ( sroot , parent get saver context ( ) ) ; i node section i node r = i node section i node new builder ( ) set id ( sroot get id ( ) ) set type ( i node section i node type directory ) set name ( byte string copy from ( sroot get local name bytes ( ) ) ) set directory ( db ) build ( ) ; sb set root ( r ) build ( ) write delimited to ( out ) ; i + + ; if ( i % f s image format protobuf saver check cancel interval = = 0 ) { context check cancelled ( ) ; } } } preconditions check state ( i = = sm get num snapshots ( ) ) ; parent commit section ( headers , f s image format protobuf section name snapshot ) ; }


dispatches { @ link # on load completed ( int , media period id , load event info , media load data ) }

public void load completed ( load event info load event info , int data type , int track type , @ nullable format track format , int track selection reason , @ nullable object track selection data , long media start time us , long media end time us ) { load completed ( load event info , new media load data ( data type , track type , track format , track selection reason , track selection data , adjust media time ( media start time us ) , adjust media time ( media end time us ) ) ) ; }


protected static boolean locate matching credential type ( final authentication authentication , final string credential class type ) { return string utils is not blank ( credential class type ) & & authentication get credentials ( ) stream ( ) any match ( e - > e get credential class ( ) get name ( ) matches ( credential class type ) ) ; }


open either a new tab or window , depending on what is requested , and return the window handle without switching to it

public string new window ( window type type ) { response response = execute ( " safari new window " , singleton map ( " new tab " , type = = window type tab ) ) ; return ( string ) response get value ( ) ; }


serialize the given remote invocation to the given output stream the default implementation gives { @ code decorate output stream } a chance to decorate the stream first ( for example , for custom encryption or compression ) creates an { @ code object output stream } for the final stream and calls { @ code do write remote invocation } to actually write the object can be overridden for custom serialization of the invocation

protected void write remote invocation ( remote invocation invocation , output stream os ) throws i o exception { try ( object output stream oos = new object output stream ( decorate output stream ( os ) ) ) { do write remote invocation ( invocation , oos ) ; } }


public string encoding ( ) { return get string ( encoding config ) ; }


private void end compound change ( i source viewer viewer ) { if ( viewer instanceof i text viewer extension ) ( ( i text viewer extension ) viewer ) get rewrite target ( ) end compound change ( ) ; }


get cache files set in the configuration

public uri [ ] get cache files ( ) throws i o exception ;


test that creating one tree multimap from another does not copy the comparators from the source tree multimap

public void test create from tree multimap ( ) { multimap < double , double > tree = tree multimap create ( key comparator , value comparator ) ; tree put ( 1 0 , 2 0 ) ; tree put ( 2 0 , 3 0 ) ; tree put ( 3 0 , 4 0 ) ; tree put ( 4 0 , 5 0 ) ; tree multimap < double , double > copy from tree = tree multimap create ( tree ) ; assert equals ( tree , copy from tree ) ; assert same ( ordering natural ( ) , copy from tree key comparator ( ) ) ; assert same ( ordering natural ( ) , copy from tree value comparator ( ) ) ; assert same ( ordering natural ( ) , copy from tree get ( 1 0 ) comparator ( ) ) ; }


return the size of the remaining available bytes if the size is less than or equal to { @ link integer # max value } , otherwise , return { @ link integer # max value } this is to match the behavior of d f s input stream available ( ) , which some clients may rely on ( h base write - ahead log reading in particular )

public synchronized int available ( ) throws i o exception { if ( closed ) { throw new i o exception ( " stream closed " ) ; } if ( page blob size = = - 1 ) { try { page blob size = get page blob data size ( blob , op context ) ; } catch ( storage exception e ) { throw new i o exception ( " unable to get page blob size " , e ) ; } } final long remaining = page blob size - file position ; return remaining < = integer max value ? ( int ) remaining : integer max value ; }


public tuple 0 copy ( ) { return new tuple 0 ( ) ; }


gets list of command - line arguments for the work directory

public list < string > to command line args ( @ non null slave computer computer ) { if ( disabled ) { return collections empty list ( ) ; } array list < string > args = new array list < > ( ) ; args add ( " - work dir " ) ; if ( work dir path = = null ) { slave node = computer get node ( ) ; if ( node = = null ) { / / it is not possible to launch this node anyway return collections empty list ( ) ; } args add ( node get remote f s ( ) ) ; } else { args add ( work dir path ) ; } if ( ! default internal dir equals ( internal dir ) ) { args add ( " - internal dir " ) ; args add ( internal dir ) ; } if ( fail if work dir is missing ) { args add ( " - fail if work dir is missing " ) ; } return collections unmodifiable list ( args ) ; }


test for block recovery taking longer than the heartbeat interval

public void test recovery slower than heartbeat ( ) throws exception { tear down ( ) ; / / stop the mocked dn started in startup ( ) sleep answer delayer = new sleep answer ( 3000 , 6000 ) ; test recovery with datanode delayed ( delayer ) ; }


sets the amount of delay between each backoff attempt when flushing bulk requests , in milliseconds

public void set bulk flush backoff delay ( long delay millis ) { preconditions check argument ( delay millis > = 0 , " delay ( in milliseconds ) between each backoff attempt must be larger than or equal to 0 " ) ; this bulk requests config put ( config key bulk flush backoff delay , string value of ( delay millis ) ) ; }


override this to check invariants which should hold true for a particular implementation , but which are not generally applicable to every instance of map

protected void assert more invariants ( map < k , v > map ) { }


set the class loader to use for loading bean classes default is the thread context class loader note that this class loader will only apply to bean definitions that do not carry a resolved bean class yet this is the case as of spring 2 0 by default : bean definitions only carry bean class names , to be resolved once the factory processes the bean definition

void set bean class loader ( @ nullable class loader bean class loader ) ;


finds all the circuits , or cycles , in the given graph

public static < v , e extends g edge < v > > list < list < v > > find circuits ( g directed graph < v , e > g , boolean unique circuits , task monitor monitor ) throws cancelled exception { list accumulator < list < v > > accumulator = new list accumulator < > ( ) ; johnson circuits algorithm < v , e > algorithm = new johnson circuits algorithm < > ( g , accumulator ) ; algorithm compute ( unique circuits , monitor ) ; return accumulator as list ( ) ; }


public map < string , boolean > get direct map ( ) { return direct map ; }


get next user visible result , returns null if currently there is no more

public t next ( ) { if ( user visible head = = user visible tail ) { return null ; } t ret = buffer remove first ( ) ; user visible head + + ; sanity check ( ) ; return ret ; }


waits for the guard to be satisfied waits indefinitely may be called only by a thread currently occupying this monitor

public void wait for uninterruptibly ( guard guard ) { if ( ! ( ( guard monitor = = this ) & lock is held by current thread ( ) ) ) { throw new illegal monitor state exception ( ) ; } if ( ! guard is satisfied ( ) ) { await uninterruptibly ( guard , true ) ; } }


construct the mqtt client impl with additional config this config can also be changed using the { @ link # get client config ( ) } function

static mqtt client create ( mqtt client config config , mqtt handler default handler ) { return new mqtt client impl ( config , default handler ) ; }


returns a copy with the given details , preserving transitive xxx sets

public java gen jars provider with direct info ( boolean uses annotation processing , @ nullable artifact gen class jar , @ nullable artifact gen source jar , nested set < artifact > processor classpath , nested set < string > processor class names ) { / / existing jars would be a problem b / c we can ' t remove them from transitive xxx sets check state ( this gen class jar = = null , " existing gen class jar : % s " , this gen class jar ) ; check state ( this gen source jar = = null , " existing gen src jar : % s " , this gen source jar ) ; return new java gen jars provider ( uses annotation processing , gen class jar , gen source jar , processor classpath , processor class names , add if ( transitive gen class jars , gen class jar ) , add if ( transitive gen source jars , gen source jar ) ) ; }


public acknowledged response unfollow ( unfollow request request , request options options ) throws i o exception { return rest high level client perform request and parse entity ( request , ccr request converters : : unfollow , options , acknowledged response : : from x content , collections empty set ( ) ) ; }


cleans the data from the passed path in the passed file system

public static void clean data ( file system fs , path dir path ) throws i o exception { fs delete ( dir path , true ) ; }


returns whether the codec needs the renderer to propagate the end - of - stream signal directly , rather than by using an end - of - stream buffer queued to the codec

protected boolean get codec needs eos propagation ( ) { return false ; }


public args build ( ) { return new args ( default port , proxy detector , sync context , service config parser , scheduled executor service , channel logger , executor ) ; }


public boolean wants params moved high ( ) { / / we ' re not smart enough for this return false ; }


determine whether there are currently thread - bound credentials , using them if available , falling back to the statically specified username and password ( i e values of the bean properties ) else

public final topic connection create topic connection ( ) throws j m s exception { jms user credentials thread credentials = this thread bound credentials get ( ) ; if ( thread credentials ! = null ) { return do create topic connection ( thread credentials username , thread credentials password ) ; } else { return do create topic connection ( this username , this password ) ; } }


returns password entered by user or null if dialog was cancelled

char [ ] get password ( ) { return ( password = = null ? null : ( char [ ] ) password clone ( ) ) ; }


public void remove ( k key ) throws exception { map remove ( key ) ; }


public builder set bind address ( string bind address ) { this bind address = bind address ; return this ; }


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


sets a custom option any existing value for the key is overwritten

public < t > call options with option ( key < t > key , t value ) { preconditions check not null ( key , " key " ) ; preconditions check not null ( value , " value " ) ; call options new options = new call options ( this ) ; int existing idx = - 1 ; for ( int i = 0 ; i < custom options length ; i + + ) { if ( key equals ( custom options [ i ] [ 0 ] ) ) { existing idx = i ; break ; } } new options custom options = new object [ custom options length + ( existing idx = = - 1 ? 1 : 0 ) ] [ 2 ] ; system arraycopy ( custom options , 0 , new options custom options , 0 , custom options length ) ; if ( existing idx = = - 1 ) { / / add a new option new options custom options [ custom options length ] = new object [ ] { key , value } ; } else { / / replace an existing option new options custom options [ existing idx ] = new object [ ] { key , value } ; } return new options ; }


helper function to merge dictionaries of terms to override or provide

private static void merge single term maps ( map < string , monolingual text value > current terms , map < string , monolingual text value > current terms if new , set < monolingual text value > new terms , set < monolingual text value > new terms if new ) { for ( monolingual text value other label : new terms ) { string language code = other label get language code ( ) ; current terms put ( language code , other label ) ; if ( current terms if new contains key ( language code ) ) { current terms if new remove ( language code ) ; } } for ( monolingual text value other label : new terms if new ) { string language code = other label get language code ( ) ; if ( ! current terms if new contains key ( language code ) & & ! current terms contains key ( language code ) ) { current terms if new put ( language code , other label ) ; } } }


returns true if the compilation unit contains a single top - level class generated by an exempt annotation processor ( according to its { @ link @ generated } annotation ) annotation processors are expected to never generate more than one top level class , as required by the style guide

public boolean is annotation processor exempt ( j c tree j c compilation unit unit ) { if ( unit get type decls ( ) size ( ) ! = 1 ) { return false ; } symbol sym = tree info symbol for ( get only element ( unit get type decls ( ) ) ) ; if ( sym = = null ) { return false ; } for ( string value : get generated by ( sym ) ) { if ( dependency module get exempt generators ( ) contains ( value ) ) { return true ; } } return false ; }


test the specified task java heap options

private void test java heap options ( string map options , string reduce options , string task options , string default map options , string default reduce options , string default task options , string expected map options , string expected reduce options , string expected task options ) throws exception { configuration simulated conf = new configuration ( ) ; / / reset the configuration parameters simulated conf unset ( m r job config map java opts ) ; simulated conf unset ( m r job config reduce java opts ) ; simulated conf unset ( job conf mapred task java opts ) ; / / set the default map task options if ( default map options ! = null ) { simulated conf set ( m r job config map java opts , default map options ) ; } / / set the default reduce task options if ( default reduce options ! = null ) { simulated conf set ( m r job config reduce java opts , default reduce options ) ; } / / set the default task options if ( default task options ! = null ) { simulated conf set ( job conf mapred task java opts , default task options ) ; } configuration original conf = new configuration ( ) ; / / reset the configuration parameters original conf unset ( m r job config map java opts ) ; original conf unset ( m r job config reduce java opts ) ; original conf unset ( job conf mapred task java opts ) ; / / set the map task options if ( map options ! = null ) { original conf set ( m r job config map java opts , map options ) ; } / / set the reduce task options if ( reduce options ! = null ) { original conf set ( m r job config reduce java opts , reduce options ) ; } / / set the task options if ( task options ! = null ) { original conf set ( job conf mapred task java opts , task options ) ; } / / configure the task jvm ' s heap options gridmix job configure task j v m options ( original conf , simulated conf ) ; assert equals ( " map heap options mismatch ! " , expected map options , simulated conf get ( m r job config map java opts ) ) ; assert equals ( " reduce heap options mismatch ! " , expected reduce options , simulated conf get ( m r job config reduce java opts ) ) ; assert equals ( " task heap options mismatch ! " , expected task options , simulated conf get ( job conf mapred task java opts ) ) ; }


to test value and watermark serialization and deserialization with time characteristic : event time producer parallelism = 1 ; kafka partition # = 1 ; consumer parallelism = 1

public void test ser de event time ( ) throws exception { test record ser de ( event time ) ; }


strategy for a varying named function signature like { @ code f ( i int , str string , num numeric ) } using a sequence of { @ link argument type strategy } s the first n - 1 arguments must be constant the n - th argument can occur 0 , 1 , or more times

public static input type strategy varying sequence ( string [ ] argument names , argument type strategy [ ] strategies ) { return new varying sequence input type strategy ( arrays as list ( strategies ) , arrays as list ( argument names ) ) ; }


this test validates that an invalid program exception is thrown when max by is used on a custom data type

public void test custom key fields grouping ( ) { final execution environment env = execution environment get execution environment ( ) ; this custom type data add ( new custom type ( ) ) ; unsorted grouping < custom type > group ds = env from collection ( custom type data ) group by ( 0 ) ; / / should not work : groups on custom type group ds max by ( 0 ) ; }


tests good path saslplain client and server channels using ssl transport layer also tests successful re - authentication

public void test valid sasl plain over ssl ( ) throws exception { string node = " 0 " ; security protocol security protocol = security protocol sasl ssl ; configure mechanisms ( " plain " , arrays as list ( " plain " ) ) ; server = create echo server ( security protocol ) ; check authentication and reauthentication ( security protocol , node ) ; }


returns the installed bundled ( external ) themes

public map < string , m t bundled theme > get bundled themes ( ) { return collections unmodifiable map ( bundled themes ) ; }


writes a long value into the byte array at the given offset

public void put long ( byte [ ] b , int offset , long value ) ;


{ @ inherit doc } the default implementation does nothing

@ override public void enter case ( sql base parser case context ctx ) { }


return a { @ code request predicate } that matches if request ' s http method is { @ code head } and the given { @ code pattern } matches against the request path

public static request predicate head ( string pattern ) { return method ( http method head ) and ( path ( pattern ) ) ; }


register a resource as a default resource do not attempt to use this unless you understand that the order in which default resources are loaded affects the outcome , and that subclasses of configuration often register new default resources

public static url register default resource ( string resource ) { url res u r l = get resource url ( resource ) ; if ( res u r l ! = null ) { configuration add default resource ( resource ) ; } return res u r l ; }


the settings to create the index with ( either jsonyamlproperties format )

public create index request settings ( map < string , ? > source ) { this settings = settings builder ( ) load from map ( source ) build ( ) ; return this ; }


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


public void should see 4 0 0 after update user ( ) { string username = null ; user body = null ; api update user ( ) username path ( username ) body ( body ) execute ( r - > r pretty peek ( ) ) ; / / todo : test validations }


the last block is truncated at mid ( non copy - on - truncate ) shutdown the datanodes immediately after truncate

public void test truncate with data nodes shutdown immediately ( ) throws exception { int starting file size = 3 * block size ; byte [ ] contents = append test util init buffer ( starting file size ) ; final path p = new path ( parent , " test truncate with data nodes shutdown immediately " ) ; write contents ( contents , starting file size , p ) ; int to truncate length = 1 ; int new length = starting file size - to truncate length ; boolean is ready = fs truncate ( p , new length ) ; assert false ( is ready ) ; cluster shutdown data nodes ( ) ; cluster set data nodes dead ( ) ; try { for ( int i = 0 ; i < success attempts & & cluster is data node up ( ) ; i + + ) { thread sleep ( sleep ) ; } assert false ( " all data nodes should be down " , cluster is data node up ( ) ) ; located blocks blocks = get located blocks ( p ) ; assert true ( blocks is under construction ( ) ) ; } finally { cluster start data nodes ( conf , datanode num , true , startup option regular , null ) ; cluster wait active ( ) ; } check block recovery ( p ) ; fs delete ( parent , true ) ; }


persist a checkpoint in the internal index

void put transform checkpoint ( transform checkpoint checkpoint , action listener < boolean > listener ) ;


introduce round - trip delay on local host

public static void delay ( final int time ) throws exception { if ( time < 0 ) { throw new illegal argument exception ( " negative latency " ) ; } final int delay = time / 2 ; if ( delay = = 0 ) { unit help process ( string format ( tc reset , " lo " ) ) ; } else {


set the precision use o make suggestions

public builder precision ( double precision , distance unit unit ) { return precision ( unit to meters ( precision ) ) ; }


pre - commit hook invoked prior to an offset commit the default implementation simply invokes { @ link # flush ( map ) } and is thus able to assume all { @ code current offsets } are safe to commit

public map < topic partition , offset and metadata > pre commit ( map < topic partition , offset and metadata > current offsets ) { flush ( current offsets ) ; return current offsets ; }


test the property ' prefix namespace integer '

public void prefix namespace integer test ( ) { / / todo : test prefix namespace integer }


public string get property class ( ) { return property class ; }


whether or not the memory at the indicated address appears to be a valid location for the indicated number of try block map entry data types

protected void validate model specific info ( ) throws invalid data type exception { / / does each try map entry have a valid catch handler ? int num entries = get count ( ) ; for ( int try block ordinal = 0 ; try block ordinal < num entries ; try block ordinal + + ) { if ( ! is valid map ( get catch handler count ( try block ordinal ) , get catch handler map address ( try block ordinal ) ) ) { throw new invalid data type exception ( get name ( ) + " data type at " + get address ( ) + " doesn ' t have a valid catch handler map " ) ; } } }


configure the complete list of supported return value types , effectively overriding the ones configured by default this is an advanced option ; for most use cases it should be sufficient to use { @ link # set custom return value handlers }

public void set return value handlers ( @ nullable list < handler method return value handler > return value handlers ) { if ( return value handlers = = null ) { this return value handlers clear ( ) ; return ; } this return value handlers add handlers ( return value handlers ) ; }


the primary term of the last primary that has changed this document , if found

public long get primary term ( ) { return primary term ; }


called when a mouse button or a finger touch is moved anywhere , but only if touch down previously returned true for the mouse button or touch the touch dragged event is always { @ link event # handle ( ) handled }

public void touch dragged ( input event event , float x , float y , int pointer ) { }


public list < integer > get array item ( ) { return array item ; }


tests simple access to restore properties

public void test simple access ( ) throws exception { long checkpoint id = integer max value + 1l ; long trigger timestamp = integer max value + 1l ; checkpoint properties props = new checkpoint properties ( true , checkpoint type savepoint , false , false , true , false , true ) ; long restore timestamp = integer max value + 1l ; string external path = " external - path " ; restored checkpoint stats restored = new restored checkpoint stats ( checkpoint id , props , restore timestamp , external path ) ; assert equals ( checkpoint id , restored get checkpoint id ( ) ) ; assert equals ( props , restored get properties ( ) ) ; assert equals ( restore timestamp , restored get restore timestamp ( ) ) ; assert equals ( external path , restored get external path ( ) ) ; }


returns true if an entry was added , false if the map already contains { @ code input }

boolean put ( action input input , file artifact value metadata , @ nullable artifact dep owner ) ;


send an empty packet to mark the end of the block

void end target blocks ( ) { for ( int i = 0 ; i < targets length ; i + + ) { if ( targets status [ i ] ) { try { writers [ i ] end target block ( packet buf ) ; } catch ( i o exception e ) { log warn ( e get message ( ) ) ; } } } }


force set the # of containers to ask for this request set to a given value

public void set num containers ( int new value ) throws yarn exception { if ( this num containers = = 0 ) { throw new yarn exception ( " should not set num containers to " + new value + " for a cancel request set : " + to string ( ) ) ; } / / clone the resource request object whenever we need to change it int old value = this num containers ; this num containers = new value ; if ( this key get exe type ( ) equals ( execution type opportunistic ) ) { / / the assumption we made about o asks is that all rr in a request set has / / the same num containers value map < string , resource request > new asks = new hash map < > ( ) ; for ( resource request rr : this asks values ( ) ) { resource request clone = resource request clone ( rr ) ; clone set num containers ( new value ) ; new asks put ( clone get resource name ( ) , clone ) ; } this asks = new asks ; } else { resource request rr = this asks get ( resource request any ) ; if ( rr = = null ) { throw new yarn exception ( " no any rr found in request set with num containers = " + old value ) ; } resource request clone = resource request clone ( rr ) ; clone set num containers ( new value ) ; this asks put ( resource request any , clone ) ; } }


creates a frame reader with max header table size of 4096 and data frame compression disabled

@ override public frame reader new reader ( buffered source source , boolean client ) { return new reader ( source , 4096 , client ) ; }


public static class node loader get class node loader ( ) { return the bytecode club bytecodeviewer bytecode viewer loader ; }


delete the file with the given name and return whether deleting it was successful


given the class , list up its { @ link property type } s from its public fieldsgetters

private map < string , property type > build property types ( class < ? > clazz ) { map < string , property type > r = new hash map < > ( ) ; for ( field f : clazz get fields ( ) ) r put ( f get name ( ) , new property type ( f ) ) ; for ( method m : clazz get methods ( ) ) if ( m get name ( ) starts with ( " get " ) ) r put ( introspector decapitalize ( m get name ( ) substring ( 3 ) ) , new property type ( m ) ) ; return r ; }


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 " ) ; }


adds the keyvalue pair this object represents to the given map of environment variables the value of the entry is expanded with the given { @ code variables }

public void add env entry ( cc toolchain variables variables , immutable map builder < string , string > env builder ) throws expansion exception { string builder value = new string builder ( ) ; for ( string chunk chunk : value chunks ) { value append ( chunk expand ( variables ) ) ; } env builder put ( key , value to string ( ) ) ; }


gets the executable path of this maven on the given target system

public string get executable ( launcher launcher ) throws i o exception , interrupted exception { return launcher get channel ( ) call ( new get executable ( get home ( ) ) ) ; }