return the path array of the localized files intended to be used by user code

public static path [ ] get local cache files ( configuration conf ) throws i o exception { return string utils string to path ( conf get strings ( m r job config cache localfiles ) ) ; }


test to demonstrate the intended behaviour of the function , for issue # 1268 https : github com open refine open refineissues 1 2 6 8

public void test split multi valued cells text separator ( ) throws exception { abstract operation op = new multi valued cell split operation ( " value " , " key " , " : " , false ) ; process process = op create process ( project , new properties ( ) ) ; process perform immediate ( ) ; int key col = project column model get column by name ( " key " ) get cell index ( ) ; int value col = project column model get column by name ( " value " ) get cell index ( ) ; assert assert equals ( project rows get ( 0 ) get cell value ( key col ) , " record 1 " ) ; assert assert equals ( project rows get ( 0 ) get cell value ( value col ) , " one " ) ; assert assert equals ( project rows get ( 1 ) get cell value ( key col ) , null ) ; assert assert equals ( project rows get ( 1 ) get cell value ( value col ) , " two ; three four ; five six sevè ëight ; niné 9 1 0 1 1twelve thirteen 1 4 àifteen " ) ; }


public boolean equals ( object other ) { if ( this = = other ) { return true ; } if ( other instanceof model snapshot = = false ) { return false ; } model snapshot that = ( model snapshot ) other ; return objects equals ( this job id , that job id ) & & objects equals ( this min version , that min version ) & & objects equals ( this timestamp , that timestamp ) & & objects equals ( this description , that description ) & & objects equals ( this snapshot id , that snapshot id ) & & this snapshot doc count = = that snapshot doc count & & objects equals ( this model size stats , that model size stats ) & & objects equals ( this quantiles , that quantiles ) & & objects equals ( this latest record time stamp , that latest record time stamp ) & & objects equals ( this latest result time stamp , that latest result time stamp ) & & this retain = = that retain ; }


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


clear the resource bundle caches of this message source and all its ancestors

public void clear cache including ancestors ( ) { clear cache ( ) ; if ( get parent message source ( ) instanceof reloadable resource bundle message source ) { ( ( reloadable resource bundle message source ) get parent message source ( ) ) clear cache including ancestors ( ) ; } }


called when the offload buffer has been partially emptied

default void on offload buffer emptying ( ) { }


public boolean contains p k ( list < string > cols ) { if ( cols = = null ) { return false ; } list < string > pk = get primary key only name ( ) ; if ( pk is empty ( ) ) { return false ; } / / at least contain one pk if ( cols contains all ( pk ) ) { return true ; } else { return collection utils to upper list ( cols ) contains all ( collection utils to upper list ( pk ) ) ; } }


tests that - pie is removed when - shared is also present ( http : b 5 6 1 1 8 9 1 # )

public void test pie option kept for executables ( ) throws exception { rule context rule context = create dummy rule context ( ) ; cpp link action link action = create link builder ( rule context , link target type executable , " dummy rule context / out " , immutable list of ( ) , immutable list of ( ) , get mock feature configuration ( / * env vars = * / immutable map of ( ) ) ) set linking mode ( link linking mode static ) add linkopts ( immutable list of ( " - pie " , " - other " , " - pie " ) ) build ( ) ; list < string > argv = link action get link command line ( ) get raw link argv ( ) ; assert that ( argv ) contains ( " - pie " ) ; assert that ( argv ) contains ( " - other " ) ; }


set the span of url must set { @ code view set movement method ( link movement method get instance ( ) ) }

public span utils set url ( @ non null final string url ) { if ( m text view ! = null & & m text view get movement method ( ) = = null ) { m text view set movement method ( link movement method get instance ( ) ) ; } this url = url ; return this ; }


creates a { @ code striped < read write lock > } with eagerly initialized , strongly referenced read - write locks every lock is reentrant

public static striped < read write lock > read write lock ( int stripes ) { return custom ( stripes , read write lock supplier ) ; }


transfer funds from one bank account to another

boolean transfer funds ( int amount , string source back account , string destination bank account ) ;


configures how to buffer elements before sending them in bulk to the cluster for efficiency sets an exponential backoff type to use when flushing bulk requests

public elasticsearch bulk flush backoff exponential ( ) { internal properties put string ( connector bulk flush backoff type , elasticsearch validator connector bulk flush backoff type value exponential ) ; return this ; }


returns a conservative estimate of the maximum length of the strings contained in the class ' s constant pool table

public int get max string length ( ) { return max string length ; }


returns the number of instructions in the pattern sequence

public int instruction count ( ) { return pattern instructions length ; }


discouraged synonym for { @ link # compare false first }

public final comparison chain compare ( boolean left , boolean right ) { return compare false first ( left , right ) ; }


increases the result vector component at the specified position by the specified delta

private void update result vector ( int position , int delta ) { / / inflate the vector to contain the given position while ( this result vector size ( ) < = position ) { this result vector add ( 0 ) ; } / / increment the component value final int component = this result vector get ( position ) ; this result vector set ( position , component + delta ) ; }


signals to perform an update see the class header for the usage of the various update methods

protected synchronized void update later ( ) { if ( disposed ) { return ; } request time = system current time millis ( ) ; buffering start time = buffering start time = = none ? request time : buffering start time ; schedule check for work ( ) ; }


user - specified workspace directory , or null if it ' s up to jenkins normally a project uses the workspace location assigned by its parent container , but sometimes people have builds that have hard - coded paths this is not { @ link file } because it may have to hold a path representation on another os if this path is relative , it ' s resolved against { @ link node # get root path ( ) } on the node where this workspace is prepared

public void set custom workspace ( string custom workspace ) throws i o exception { this custom workspace = util fix empty and trim ( custom workspace ) ; save ( ) ; }


return an array with thrown message exceptions note that a general mail server connection failure will not result in failed messages being returned here : a message will only be contained here if actually sending it was attempted but failed

public final exception [ ] get message exceptions ( ) { return ( this message exceptions ! = null ? this message exceptions : new exception [ 0 ] ) ; }


verify that the user cannot delete an immutable tag ( a tag that has been preloaded from a configuration file ) secondary checks : verify that the delete button will still be disabled if we add non - immutable tags to the selection verify that the delete button will become enabled if we remove any immutable tags from the selection

public void test delete immutable tag ( ) throws exception { function tag table table = get source table ( ) ; / / get an immutable tag from the source panel and set it to be selected verify that / / the delete button is disabled in memory function tag immutable tag = get immutable tag ( ) ; assert true ( " must have at least one immutable tag for this test " , immutable tag ! = null ) ; select tag in table ( immutable tag get name ( ) , table ) ; wait for swing ( ) ; assert false ( is button enabled ( " delete btn " ) ) ; / / create a new tag and add it to the selection , and verify that the delete / / button is still disabled string tag name = " tag 1 " ; create tag ( tag name ) ; wait for swing ( ) ; table add row selection interval ( 0 , table get row count ( ) - 1 ) ; wait for swing ( ) ; assert false ( is button enabled ( " delete btn " ) ) ; / / select just the non - immutable tag and verify that the delete button is now / / enabled select tag in table ( tag name , table ) ; wait for swing ( ) ; assert true ( is button enabled ( " delete btn " ) ) ; }


public int get status code ( ) { return status code ; }


try to remove the given reference and then return the reference count if the given inode is not a reference , return - 1 ;

public static int try remove reference ( i node inode ) { if ( ! inode is reference ( ) ) { return - 1 ; } return remove reference ( inode as reference ( ) ) ; }


visit a parse tree produced by the { @ code show functions } labeled alternative in { @ link sql base parser # statement }

t visit show functions ( sql base parser show functions context ctx ) ;


sets the cursor on the root panel for the dialog component

public void set cursor ( cursor cursor ) { root panel set cursor ( cursor ) ; }


protected void initialize pieces ( ) { pieces add ( new piece ( " x " , " x / xxx / x " , false , one rotation ) ) ; pieces add ( new piece ( " v " , " x / x / xxx " , false , four rotations ) ) ; pieces add ( new piece ( " t " , " xxx / x / x " , false , four rotations ) ) ; pieces add ( new piece ( " w " , " x / xx / xx " , false , four rotations ) ) ; pieces add ( new piece ( " u " , " x x / xxx " , false , four rotations ) ) ; pieces add ( new piece ( " i " , " xxxxx " , false , two rotations ) ) ; pieces add ( new piece ( " f " , " xx / xx / x " , true , four rotations ) ) ; pieces add ( new piece ( " p " , " xx / xx / x " , true , four rotations ) ) ; pieces add ( new piece ( " z " , " xx / x / xx " , true , two rotations ) ) ; pieces add ( new piece ( " n " , " xx / xxx " , true , four rotations ) ) ; pieces add ( new piece ( " y " , " x / xxxx " , true , four rotations ) ) ; pieces add ( new piece ( " l " , " x / xxxx " , true , four rotations ) ) ; }


create a { @ code char sequence encoder } that supports all mime types

public static char sequence encoder all mime types ( ) { return new char sequence encoder ( new mime type ( " text " , " plain " , default charset ) , mime type utils all ) ; }


asserts that the results are the expected amount and it has both success and failure

private static void assert both results ( string msg , int expected , task results actual ) { assert equals ( msg , expected , actual get total ( ) ) ; assert true ( " expected some success for " + msg , actual get success ( ) > 0 ) ; assert true ( " expected some failure for " + msg , actual get failure ( ) > 0 ) ; }


public void test branching with multiple data sinks small ( ) { try { string out path 1 = " / tmp / out 1 " ; string out path 2 = " / tmp / out 2 " ; / / construct the plan execution environment env = execution environment get execution environment ( ) ; env set parallelism ( default parallelism ) ; data set < long > source 1 = env generate sequence ( 0 , 1 ) ; source 1 write as text ( out path 1 ) ; source 1 write as text ( out path 2 ) ; plan plan = env create program plan ( ) ; optimized plan o plan = compile no stats ( plan ) ; / / - - - - - - - - - - check the optimizer plan - - - - - - - - - - / / number of sinks assert assert equals ( " wrong number of data sinks " , 2 , o plan get data sinks ( ) size ( ) ) ; / / sinks contain all sink paths set < string > all sinks = new hash set < string > ( ) ; all sinks add ( out path 1 ) ; all sinks add ( out path 2 ) ; for ( sink plan node n : o plan get data sinks ( ) ) { string path = ( ( text output format < string > ) n get sink node ( ) get operator ( ) get format wrapper ( ) get user code object ( ) ) get output file path ( ) to string ( ) ; assert assert true ( " invalid data sink " , all sinks remove ( path ) ) ; } / / - - - - - - - - - - compile plan to job graph to verify that no error is thrown - - - - - - - - - - job graph generator job gen = new job graph generator ( ) ; job gen compile job graph ( o plan ) ; } catch ( exception e ) { e print stack trace ( ) ; assert fail ( e get message ( ) ) ; } }


sets the { @ link rule link expander } to be used to expand links in the html documentation

public void set rule link expander ( rule link expander link expander ) { this link expander = link expander ; }


acquires the { @ link index commit } which should be included in a snapshot

public engine index commit ref acquire index commit for snapshot ( ) throws engine exception { final index shard state state = this state ; / / one time volatile read if ( state = = index shard state started ) { / / unlike acquire last index commit ( ) , there ' s no need to acquire a snapshot on a shard that is shutting down return get engine ( ) acquire index commit for snapshot ( ) ; } else { throw new illegal index shard state exception ( shard id , state , " snapshot is not allowed " ) ; } }


returns the precision of this { @ link decimal data } the precision is the number of digits in the unscaled value

public int precision ( ) { return precision ; }


open a session for the session factory that this interceptor uses the default implementation delegates to the { @ link session factory # open session } method and sets the { @ link session } ' s flush mode to " manual "

protected session open session ( ) throws data access resource failure exception { try { session session = obtain session factory ( ) open session ( ) ; session set hibernate flush mode ( flush mode manual ) ; return session ; } catch ( hibernate exception ex ) { throw new data access resource failure exception ( " could not open hibernate session " , ex ) ; } }


calculate ordered cartesian product of sets

public static set < map < string , string > > product ( final set < map < string , string > > collect , final map < string , set < string > > pending ) { if ( pending is empty ( ) ) { return collect ; } final set < map < string , string > > extract = new hash set < map < string , string > > ( ) ; final string key = pending key set ( ) iterator ( ) next ( ) ; for ( final string value : pending remove ( key ) ) { final map < string , string > map = new tree map < string , string > ( ) ; map put ( key , value ) ; extract add ( map ) ; } if ( collect is empty ( ) ) { collect add all ( extract ) ; return product ( collect , pending ) ; } else { final set < map < string , string > > inject = new hash set < map < string , string > > ( ) ; for ( final map < string , string > map extr : extract ) { for ( final map < string , string > map coll : collect ) { final map < string , string > map prod = new tree map < string , string > ( ) ; map prod put all ( map extr ) ; map prod put all ( map coll ) ; inject add ( map prod ) ; } } return product ( inject , pending ) ; } }


release all buffers in the queue and complete all listeners and promises

public void release and fail all ( throwable cause ) { release and fail all ( channel , cause ) ; }


creates a key for the workspace file function the path to the workspace file is specified by { @ code path } this key will ask workspace file function to get the { @ code idx + 1 } - th part of the workspace file ( so idx = 0 represents the first part , idx = 1 , the second part , etc )

public static workspace file key key ( rooted path path , int idx ) { return workspace file key create ( path , idx ) ; }


retrieves the edge direction in which messages are propagated in the scatter - gather iteration

public edge direction get direction ( ) { return direction ; }


gets the { @ link language } for this object ' s { @ link language i d } , using the given language service to do the lookup

public language get language ( language service language service ) throws language not found exception { return language service get language ( language i d ) ; }


asserts correct reading of standard test data from { @ code sample queue }

private void assert read test data ( format start format , int first sample index , int sample count ) { assert read test data ( start format , first sample index , sample count , / * sample offset us = * / 0 , / * decode only until us = * / 0 ) ; }


{ @ code abstract delegating smart context loader } does not support the { @ link context loader # process locations ( class , string ) } method call { @ link # process context configuration ( context configuration attributes ) } instead

public final string [ ] process locations ( class < ? > clazz , @ nullable string locations ) { throw new unsupported operation exception ( " delegating smart context loaders do not support the context loader spi " + " call process context configuration ( context configuration attributes ) instead " ) ; }


this test is fairly evil this test is to ensure that we are protected against a race condition when unfollowing and a background renewal fires the action of unfollowing will remove retention leases from the leader if a background renewal is firing at that time , it means that we will be met with a retention lease not found exception that will in turn trigger behavior to attempt to re - add the retention lease , which means we are left in a situation where we have unfollowed , but the retention lease still remains on the leader however , we have a guard against this in the callback after the retention lease not found exception is thrown , which checks if the shard follow node task is cancelled or completed to test this this behavior is correct , we capture the call to renew the retention lease then , we will step in between and execute an unfollow request this will remove the retention lease on the leader at this point , we can unlatch the renew call , which will now be met with a retention lease not found exception we will cheat and wait for that response to come back , and then synchronously trigger the listener which will check to see if the shard follow node task is cancelled or completed , and if not , add the retention lease back after that listener returns , we can check to see if a retention lease exists on the leader note , this done mean that listener will fire twice , once in our on response received hook , and once after our on response received callback returns 🤷 ♀

public void test periodic renewal does not add retention lease after unfollow ( ) throws exception { final string leader index = " leader " ; final string follower index = " follower " ; final int number of shards = 1 ; final int number of replicas = 1 ; final map < string , string > additional index settings = new hash map < > ( ) ; additional index settings put ( index service retention lease sync interval setting get key ( ) , time value time value millis ( 200 ) get string rep ( ) ) ; final string leader index settings = get index settings ( number of shards , number of replicas , additional index settings ) ; assert acked ( leader client ( ) admin ( ) indices ( ) prepare create ( leader index ) set source ( leader index settings , x content type json ) get ( ) ) ; ensure leader yellow ( leader index ) ; final put follow action request follow request = put follow ( leader index , follower index ) ; follower client ( ) execute ( put follow action instance , follow request ) get ( ) ; ensure follower green ( true , follower index ) ; final count down latch remove lease latch = new count down latch ( 1 ) ; final count down latch unfollow latch = new count down latch ( 1 ) ; final count down latch response latch = new count down latch ( 1 ) ; final cluster state response follower cluster state = follower client ( ) admin ( ) cluster ( ) prepare state ( ) clear ( ) set nodes ( true ) get ( ) ; try { for ( final discovery node sender node : follower cluster state get state ( ) nodes ( ) ) { final mock transport service sender transport service = ( mock transport service ) get follower cluster ( ) get instance ( transport service class , sender node get name ( ) ) ; sender transport service add send behavior ( ( connection , request id , action , request , options ) - > { if ( retention lease actions renew action name equals ( action ) | | transport action proxy get proxy action ( retention lease actions renew action name ) equals ( action ) ) { final string retention lease id = get retention lease id ( follower index , leader index ) ; logger info ( " - - > blocking renewal request for retention lease [ { } ] until unfollowed " , retention lease id ) ; try { remove lease latch count down ( ) ; unfollow latch await ( ) ; sender transport service add message listener ( new transport message listener ( ) { @ suppress warnings ( " rawtypes " ) @ override public void on response received ( final long response request id , final transport response context context ) { if ( request id = = response request id ) { final retention lease not found exception e = new retention lease not found exception ( retention lease id ) ; context handler ( ) handle exception ( new remote transport exception ( e get message ( ) , e ) ) ; response latch count down ( ) ; sender transport service remove message listener ( this ) ; } } } ) ; } catch ( final interrupted exception e ) { thread current thread ( ) interrupt ( ) ; fail ( e to string ( ) ) ; } } connection send request ( request id , action , request , options ) ; } ) ; } remove lease latch await ( ) ; pause follow ( follower index ) ; assert acked ( follower client ( ) admin ( ) indices ( ) close ( new close index request ( follower index ) ) action get ( ) ) ; assert acked ( follower client ( ) execute ( unfollow action instance , new unfollow action request ( follower index ) ) action get ( ) ) ; unfollow latch count down ( ) ; response latch await ( ) ; final indices stats response after unfollow stats = leader client ( ) admin ( ) indices ( ) stats ( new indices stats request ( ) clear ( ) indices ( leader index ) ) action get ( ) ; final list < shard stats > after unfollow shards stats = get shards stats ( after unfollow stats ) ; for ( final shard stats shard stats : after unfollow shards stats ) { assert not null ( shard stats get retention lease stats ( ) ) ; assert that ( strings to string ( shard stats ) , retention lease utils to map excluding peer recovery retention leases ( shard stats get retention lease stats ( ) retention leases ( ) ) values ( ) , empty ( ) ) ; } } finally { for ( final discovery node sender node : follower cluster state get state ( ) nodes ( ) ) { final mock transport service sender transport service = ( mock transport service ) get follower cluster ( ) get instance ( transport service class , sender node get name ( ) ) ; sender transport service clear all rules ( ) ; } } }


< code > optional aapt pb reference ref = 1 ; < code >

public boolean has ref ( ) { return instance has ref ( ) ; }


return the " low watermark " for the topic partition on which the deletion was executed

public long low watermark ( ) { return low watermark ; }


< code > optional aapt pb attribute attr = 1 ; < code >

private void merge attr ( com android aapt resources attribute value ) { if ( attr ! = null & & attr ! = com android aapt resources attribute get default instance ( ) ) { attr = com android aapt resources attribute new builder ( attr ) merge from ( value ) build partial ( ) ; } else { attr = value ; } bit field 0 | = 0x 0 0 0 0 0 0 0 1 ; }


public integer get int 3 2 ( ) { return int 3 2 ; }


returns the { @ link weight } for this filter aggregation , creating it if necessary this is done lazily so that the { @ link weight } is only created if the aggregation collects documents reducing the overhead of the aggregation in the case where no documents are collected note that as aggregations are initialsed and executed in a serial manner , no concurrency considerations are necessary here

public weight get weight ( ) { if ( weight = = null ) { index searcher context searcher = context searcher ( ) ; try { weight = context searcher create weight ( context searcher rewrite ( filter ) , score mode complete no scores , 1f ) ; } catch ( i o exception e ) { throw new aggregation initialization exception ( " failed to initialse filter " , e ) ; } } return weight ; }


convert the given property from the properties source to the value which should be applied the default implementation calls { @ link # convert property value ( string ) }

protected string convert property ( string property name , string property value ) { return convert property value ( property value ) ; }


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


flushes both the adapter and the underlying { @ link media codec }


public static void main ( string [ ] args ) { / / parse the arguments if ( args length < 1 ) { system err println ( usage ) ; system exit ( - 1 ) ; } string regular expresssion = stack trace expression ; boolean verbose = false ; int argument index = 0 ; while ( argument index < args length ) { string arg = args [ argument index ] ; if ( arg equals ( regex option ) ) { regular expresssion = args [ + + argument index ] ; } else if ( arg equals ( verbose option ) ) { verbose = true ; } else { break ; } argument index + + ; } if ( argument index > = args length ) { system err println ( usage ) ; system exit ( - 1 ) ; } / / convert the arguments into file instances file mapping file = new file ( args [ argument index + + ] ) ; file stack trace file = argument index < args length ? new file ( args [ argument index ] ) : null ; try { / / open the input stack trace we ' re always using the utf - 8 / / character encoding , even for reading from the standard / / input line number reader reader = new line number reader ( new buffered reader ( new input stream reader ( stack trace file = = null ? system in : new file input stream ( stack trace file ) , " utf - 8 " ) ) ) ; / / open the output stack trace , again using utf - 8 encoding print writer writer = new print writer ( new output stream writer ( system out , " utf - 8 " ) ) ; try { / / execute re trace with the collected settings new re trace ( regular expresssion , verbose , mapping file ) retrace ( reader , writer ) ; } finally { / / close the input stack trace if it was a file if ( stack trace file ! = null ) { reader close ( ) ; } } } catch ( i o exception ex ) { if ( verbose ) { / / print a verbose stack trace ex print stack trace ( ) ; } else { / / print just the stack trace message system err println ( " error : " + ex get message ( ) ) ; } system exit ( 1 ) ; } system exit ( 0 ) ; }


public boolean get prefix ns boolean ( ) { return prefix ns boolean ; }


public void snapshot ( metrics record builder builder ) { snapshot ( builder , false ) ; }


verify if the complete steal process goes as planned

public void test steal ( ) { this method steal ( ) ; assert true ( appender log contains ( this expected target result ) ) ; assert true ( appender log contains ( this expected confuse method ) ) ; assert true ( appender log contains ( this expected steal method ) ) ; assert equals ( 3 , appender get log size ( ) ) ; }


updates and persists the status of the given watch if the watch is missing ( because it might have been deleted by the user during an execution ) , then this method does nothing and just returns without throwing an exception

public void update watch status ( watch watch ) throws i o exception { / / at the moment we store the status together with the watch , / / so we just need to update the watch itself / / we do not want to update the status state field , as it might have been deactivated in - between map < string , string > parameters = map of ( watch include status key , " true " , watch status include state , " false " ) ; to x content map params params = new to x content map params ( parameters ) ; x content builder source = json x content content builder ( ) start object ( ) field ( watch field status get preferred name ( ) , watch status ( ) , params ) end object ( ) ; update request update request = new update request ( watch index , watch id ( ) ) ; update request doc ( source ) ; update request set if seq no ( watch get source seq no ( ) ) ; update request set if primary term ( watch get source primary term ( ) ) ; try ( thread context stored context ignore = client thread pool ( ) get thread context ( ) stash with origin ( watcher origin ) ) { client update ( update request ) action get ( index default timeout ) ; } catch ( document missing exception e ) { / / do not rethrow this exception , otherwise the watch history will contain an exception / / even though the execution might have been fine / / todo should we really just drop this exception on the floor ? } }


returns true if this vertex is showing all edges in the incoming direction

public boolean is incoming expanded ( ) { return incoming expanded ; }


sets the base url to the location where the open a p i document is being served

public api client set base path ( string base path ) { this base path = base path ; set oauth base path ( base path ) ; return this ; }


opens the cli client for executing sql statements

private void open cli ( string session id , executor executor ) { path history file path ; if ( options get history file path ( ) ! = null ) { history file path = paths get ( options get history file path ( ) ) ; } else { history file path = paths get ( system get property ( " user home " ) , system utils is os windows ? " flink - sql - history " : " flink - sql - history " ) ; } try ( cli client cli = new cli client ( session id , executor , history file path ) ) { / / interactive cli mode if ( options get update statement ( ) = = null ) { cli open ( ) ; } / / execute single update statement else { final boolean success = cli submit update ( options get update statement ( ) ) ; if ( ! success ) { throw new sql client exception ( " could not submit given sql update statement to cluster " ) ; } } } }


returns a set of all values that have no dependencies as values are removed from the graph , dependencies will be removed and additional values will be eligible to be returned by this method once a value has been retrieved using this method , it will be considered " visited " and future calls to this method will not include those values to continue processing the values in the graph , all values return from this method should eventually be deleted from the graph to " free up " other values note : values retrieved by this method will no longer be eligible for return by the pop ( ) method

public synchronized set < t > get unvisited independent values ( ) { check cycle state ( ) ; visited but not deleted count + = unvisited independent set size ( ) ; set < t > return collection = unvisited independent set ; unvisited independent set = create node set ( ) ; return return collection ; }


double the capacity of this deque call only when full , i e , when head and tail have wrapped around to become equal

private void double capacity ( ) { int p = head ; int n = elements length ; int r = n - p ; / / number of elements to the right of p int new capacity = n < < 1 ; if ( new capacity < 0 ) throw new illegal state exception ( " sorry , deque too big " ) ; object [ ] a = new object [ new capacity ] ; system arraycopy ( elements , p , a , 0 , r ) ; system arraycopy ( elements , 0 , a , r , p ) ; elements = a ; head = 0 ; tail = n ; }


public void test proxy ( ) throws exception { socks socket factory template without proxy = new socks socket factory ( ) ; proxy proxy = new proxy ( type socks , inet socket address create unresolved ( " localhost " , 0 ) ) ; socks socket factory template with proxy = new socks socket factory ( proxy ) ; assert that ( template without proxy ) is not equal to ( template with proxy ) ; configuration configuration = new configuration ( ) ; configuration set ( " hadoop socks server " , " localhost : 0 " ) ; template without proxy set conf ( configuration ) ; assert that ( template without proxy ) is equal to ( template with proxy ) ; }


the interface used by clients to get a report of containers for an application attempt from the < code > resource manager < code > or < code > application history server < code > the client , via { @ link get containers request } provides the { @ link application attempt id } of the application attempt in secure mode , the < code > resource manager < code > or < code > application history server < code > verifies access to the method before accepting the request the < code > resource manager < code > or < code > application history server < code > responds with a { @ link get containers response } which includes a list of { @ link container report } for all the containers of a specific application attempt

public get containers response get containers ( get containers request request ) throws yarn exception , i o exception ;


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 : / / arg return arg ; default : return null ; } }


set the variable name to expose the url under defaults to rendering the url to the current jsp writer

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


byte [ ] build error message ( header header , int rcode , record question ) { message response = new message ( ) ; response set header ( header ) ; for ( int i = 0 ; i < 4 ; i + + ) { response remove all records ( i ) ; } response add record ( question , section question ) ; header set rcode ( rcode ) ; return response to wire ( ) ; }


returns an inet address representing the literal i pv 4 or i pv 6 host portion of a url , encoded in the format specified by rfc 3986 section 3 2 2 this function is similar to { @ link inet addresses # for string ( string ) } , however , it requires that i pv 6 addresses are surrounded by square brackets this function is the inverse of { @ link inet addresses # to uri string ( java net inet address ) }

public static inet address for uri string ( string host addr ) { inet address addr = for uri string no throw ( host addr ) ; if ( addr = = null ) { throw format illegal argument exception ( " not a valid uri ip literal : ' % s ' " , host addr ) ; } return addr ; }


generate the response for the inbound dns query

byte [ ] generate reply ( message query , socket s ) throws i o exception { header header ; boolean badversion ; int max length ; int flags = 0 ; o p t record query o p t = query get o p t ( ) ; max length = get max length ( s , query o p t ) ; header = query get header ( ) ; if ( header get flag ( flags qr ) ) { log debug ( " returning null " ) ; return null ; } if ( header get rcode ( ) ! = rcode noerror ) { return error message ( query , rcode formerr ) ; } if ( header get opcode ( ) ! = opcode query ) { return error message ( query , rcode notimp ) ; } record query record = query get question ( ) ; if ( query o p t ! = null & & ( query o p t get flags ( ) & extended flags do ) ! = 0 ) { flags = flag dnssecok ; } message response = new message ( query get header ( ) get i d ( ) ) ; response get header ( ) set flag ( flags qr ) ; if ( query get header ( ) get flag ( flags rd ) ) { response get header ( ) set flag ( flags rd ) ; response get header ( ) set flag ( flags ra ) ; } response add record ( query record , section question ) ; name name = query record get name ( ) ; int type = query record get type ( ) ; int dclass = query record get d class ( ) ; t s i g record query t s i g = query get t s i g ( ) ; if ( type = = type axfr & & s ! = null ) { return do a x f r ( name , query , null , query t s i g , s ) ; } if ( ! type is r r ( type ) & & type ! = type any ) { return error message ( query , rcode notimp ) ; } log debug ( " calling add answer " ) ; byte rcode = add answer ( response , name , type , dclass , 0 , flags ) ; if ( rcode ! = rcode noerror ) { rcode = remote lookup ( response , name , type , 0 ) ; response get header ( ) set rcode ( rcode ) ; } add additional ( response , flags ) ; if ( query o p t ! = null ) { int optflags = ( flags = = flag dnssecok ) ? extended flags do : 0 ; o p t record opt = new o p t record ( ( short ) 4096 , rcode > > > 16 , ( byte ) 0 , optflags ) ; response add record ( opt , section additional ) ; } return response to wire ( max length ) ; }


public list < list < read only first > > get array array of model ( ) { return array array of model ; }


returns the unsigned long integer value of the requested attribute , or - default value - if the attribute is missing the ' unsigned ' ness of this method refers to how the binary value is read from the dwarf information ( ie a value with the high bit set is not treated as signed ) the - default value - parameter can accept a negative value

public long get unsigned long ( int attribute , long default value ) { d w a r f numeric attribute attr = get attribute ( attribute , d w a r f numeric attribute class ) ; return ( attr ! = null ) ? attr get unsigned value ( ) : default value ; }


if set , will enable scrolling of the search request

public search scroll request builder set scroll ( scroll scroll ) { request scroll ( scroll ) ; return this ; }


private @ check for null runnable make buildable ( final buildable item p ) { if ( p task instanceof flyweight task ) { string task display name = logger is loggable ( level finest ) ? p task get full display name ( ) : null ; if ( ! is blocked by shutdown ( p task ) ) { runnable runnable = make fly weight task buildable ( p ) ; logger log ( level finest , " converting flyweight task : { 0 } into a buildable runnable " , task display name ) ; if ( runnable ! = null ) { return runnable ; } / / this is to solve jenkins - 30084 : the task has to be buildable to force the provisioning of nodes / / if the execution gets here , it means the task could not be scheduled since the node / / the task is supposed to run on is offline or not available / / thus , the flyweighttask enters the buildables queue and will ask jenkins to provision a node logger log ( level finest , " flyweight task { 0 } is entering as buildable to provision a node " , task display name ) ; return new buildable runnable ( p ) ; } / / if the execution gets here , it means the task is blocked by shutdown and null is returned logger log ( level finest , " task { 0 } is blocked by shutdown " , task display name ) ; return null ; } else { / / regular heavyweight task return new buildable runnable ( p ) ; } }


create a new { @ link parameter } from { @ code value }

public static parameter from ( object value ) { assert not null ( value , " value must not be null " ) ; return new parameter ( value , class utils get user class ( value ) ) ; }


creates an instance of type { @ link # type timeout }

public static exo playback exception create for timeout ( timeout exception cause , @ timeout operation int timeout operation ) { return new exo playback exception ( type timeout , cause , / * custom message = * / null , / * renderer name = * / null , / * renderer index = * / c index unset , / * renderer format = * / null , / * renderer format support = * / renderer capabilities format handled , timeout operation ) ; }


method called when the " open tree view " icon is hit ; creates a window relative to the event source ( in this case , a button ) and shows the list of trees currently in the program

private void open view ( object source object ) { j button button = source object instanceof j button ? ( j button ) source object : null ; final string [ ] tree names = current program get listing ( ) get tree names ( ) ; popup = new j popup menu ( " tree views " ) ; for ( int i = 0 ; i < tree names length ; i + + ) { j menu item item = new j menu item ( tree names [ i ] ) ; final int index = i ; item add action listener ( ev - > open view ( tree names [ index ] ) ) ; popup add ( item ) ; } if ( tree names length = = 0 ) { / / should not get into this state get tool ( ) set status info ( " no views exist " ) ; } else { popup set border ( new bevel border ( bevel border raised ) ) ; if ( button ! = null ) { popup show ( button , button get x ( ) - button get width ( ) , button get y ( ) ) ; } } }


returns an unmodifiable view of the union of two multisets in the returned multiset , the count of each element is the maximum of its counts in the two backing multisets the iteration order of the returned multiset matches that of the element set of { @ code multiset 1 } followed by the members of the element set of { @ code multiset 2 } that are not contained in { @ code multiset 1 } , with repeated occurrences of the same element appearing consecutively results are undefined if { @ code multiset 1 } and { @ code multiset 2 } are based on different equivalence relations ( as { @ code hash multiset } and { @ code tree multiset } are )

public static < e > multiset < e > union ( final multiset < ? extends e > multiset 1 , final multiset < ? extends e > multiset 2 ) { check not null ( multiset 1 ) ; check not null ( multiset 2 ) ; return new view multiset < e > ( ) { @ override public boolean contains ( @ nullable decl object element ) { return multiset 1 contains ( element ) | | multiset 2 contains ( element ) ; } @ override public boolean is empty ( ) { return multiset 1 is empty ( ) & & multiset 2 is empty ( ) ; } @ override public int count ( object element ) { return math max ( multiset 1 count ( element ) , multiset 2 count ( element ) ) ; } @ override set < e > create element set ( ) { return sets union ( multiset 1 element set ( ) , multiset 2 element set ( ) ) ; } @ override iterator < e > element iterator ( ) { throw new assertion error ( " should never be called " ) ; } @ override iterator < entry < e > > entry iterator ( ) { final iterator < ? extends entry < ? extends e > > iterator 1 = multiset 1 entry set ( ) iterator ( ) ; final iterator < ? extends entry < ? extends e > > iterator 2 = multiset 2 entry set ( ) iterator ( ) ; / / todo ( lowasser ) : consider making the entries live views return new abstract iterator < entry < e > > ( ) { @ override protected entry < e > compute next ( ) { if ( iterator 1 has next ( ) ) { entry < ? extends e > entry 1 = iterator 1 next ( ) ; e element = entry 1 get element ( ) ; int count = math max ( entry 1 get count ( ) , multiset 2 count ( element ) ) ; return immutable entry ( element , count ) ; } while ( iterator 2 has next ( ) ) { entry < ? extends e > entry 2 = iterator 2 next ( ) ; e element = entry 2 get element ( ) ; if ( ! multiset 1 contains ( element ) ) { return immutable entry ( element , entry 2 get count ( ) ) ; } } return end of data ( ) ; } } ; } } ; }


sets the { @ link media source } that will create the underlying media period

public void set media source ( media source media source ) { check state ( this media source = = null ) ; this media source = media source ; }


public long get pet id ( ) { return pet id ; }


gets the value in the map with the specified key


checks whether a throwable chain contains an exception matching a predicate and returns it

public static optional < throwable > find throwable ( throwable throwable , predicate < throwable > predicate ) { if ( throwable = = null | | predicate = = null ) { return optional empty ( ) ; } throwable t = throwable ; while ( t ! = null ) { if ( predicate test ( t ) ) { return optional of ( t ) ; } else { t = t get cause ( ) ; } } return optional empty ( ) ; }


instantiate a new key build with the given maximum subkes

public static key builder new instance ( final int size ) { return new key builder ( size ) ; }


always returns { @ code false } since jaxb 2 collection http message converter required generic type information in order to read a collection

public boolean can read ( class < ? > clazz , @ nullable media type media type ) { return false ; }


returns the name for this symlink in the workspace note that this is independent of the target configuration ( s ) that may help determine the symlink ' s destination

string get link name ( string symlink prefix , string product name , string workspace base name ) ;


build a host and port instance from a host only note : non - bracketed i pv 6 literals are allowed use { @ link # require brackets for i pv 6 ( ) } to prohibit these

public static host and port from host ( string host ) { host and port parsed host = from string ( host ) ; check argument ( ! parsed host has port ( ) , " host has a port : % s " , host ) ; return parsed host ; }


public void capital camel test ( ) { / / todo : test capital camel }


this implementation throws an unsupported operation exception

public class loader get new temp class loader ( ) { throw new unsupported operation exception ( " get new temp class loader not supported " ) ; }


short - circuit integer : no threadsemaphore : thread thread pool full integer : no thread pool queue full integer : no timeout : no execution result : async hystrix runtime exception fallback : sync hystrix runtime exception

public void test execution hook thread async exception sync unsuccessful fallback ( ) { assert hooks on failure ( new func 0 < test hystrix observable command < integer > > ( ) { @ override public test hystrix observable command < integer > call ( ) { return get command ( execution isolation strategy thread , abstract test hystrix command execution result async failure , abstract test hystrix command fallback result failure ) ; } } , new action 1 < test hystrix observable command < integer > > ( ) { @ override public void call ( test hystrix observable command < integer > command ) { testable execution hook hook = command get builder ( ) execution hook ; assert true ( hook command emissions match ( 0 , 1 , 0 ) ) ; assert true ( hook execution events match ( 0 , 1 , 0 ) ) ; assert true ( hook fallback events match ( 0 , 1 , 0 ) ) ; assert equals ( runtime exception class , hook get command exception ( ) get class ( ) ) ; assert equals ( runtime exception class , hook get execution exception ( ) get class ( ) ) ; assert equals ( runtime exception class , hook get fallback exception ( ) get class ( ) ) ; assert equals ( " on start - on thread start - ! on run start - on execution start - on execution error - ! on run error - on thread complete - on fallback start - on fallback error - on error - " , command get builder ( ) execution hook execution sequence to string ( ) ) ; } } ) ; }


returns a { @ link task executor gateway } corresponding to the given resource i d

optional < task executor gateway > lookup ( resource i d task executor id ) ;


returns an iterator that walks the specified array , nulling out elements behind it this can avoid memory leaks when an element is no longer necessary this is mainly just to avoid the intermediate array deque in consuming queue iterator

private static < t > iterator < t > consuming for array ( final t elements ) { return new unmodifiable iterator < t > ( ) { int index = 0 ; @ override public boolean has next ( ) { return index < elements length ; } @ override public t next ( ) { if ( ! has next ( ) ) { throw new no such element exception ( ) ; } t result = elements [ index ] ; elements [ index ] = null ; index + + ; return result ; } } ; }


post fakeinline - additional properties : test inline additional properties

default response entity < void > test inline additional properties ( @ api param ( value = " request body " , required = true ) @ valid @ request body map < string , string > param ) { return new response entity < > ( http status not implemented ) ; }


returns true if field corresponding to field i d is set ( has been assigned a value ) and false otherwise

public boolean is set ( fields field ) { if ( field = = null ) { throw new illegal argument exception ( ) ; } switch ( field ) { case success : return is set success ( ) ; } throw new illegal state exception ( ) ; }


get the name of the context hierarchy level that was declared via { @ link context configuration @ context configuration }

public string get name ( ) { return this name ; }


verify if the weather passes in the order of the { @ link weather type } s

public void test time passes ( ) { final var observer = mock ( weather observer class ) ; final var weather = new weather ( ) ; weather add observer ( observer ) ; final var in order = in order ( observer ) ; final var weather types = weather type values ( ) ; for ( var i = 1 ; i < 20 ; i + + ) { weather time passes ( ) ; in order verify ( observer ) update ( weather types [ i % weather types length ] ) ; } verify no more interactions ( observer ) ; }


compare two { @ link char sequence } objects without leaking timing information the { @ code int } return type is intentional and is designed to allow cascading of constant time operations : string s 1 = " foo " ; string s 2 = " foo " ; string s 3 = " foo " ; string s 4 = " goo " ; boolean equals = ( equals constant time ( s 1 , s 2 ) & equals constant time ( s 3 , s 4 ) ) ! = 0 ;

static int equals constant time ( char sequence s 1 , char sequence s 2 ) { if ( s 1 instanceof ascii string & & s 2 instanceof ascii string ) { if ( s 1 length ( ) ! = s 2 length ( ) ) { return 0 ; } ascii string s 1 ascii = ( ascii string ) s 1 ; ascii string s 2 ascii = ( ascii string ) s 2 ; return platform dependent equals constant time ( s 1 ascii array ( ) , s 1 ascii array offset ( ) , s 2 ascii array ( ) , s 2 ascii array offset ( ) , s 1 length ( ) ) ; } return constant time utils equals constant time ( s 1 , s 2 ) ; }


say hello to server in a blocking unary call

public void greet ( string name ) { hello request request = hello request new builder ( ) set name ( name ) build ( ) ; hello reply response = null ; status runtime exception status runtime exception = null ; try { response = blocking stub say hello ( request ) ; } catch ( status runtime exception e ) { failed rpcs increment and get ( ) ; status runtime exception = e ; } total rpcs increment and get ( ) ; if ( status runtime exception = = null ) { logger log ( level info , " greeting : { 0 } " , new object [ ] { response get message ( ) } ) ; } else { logger log ( level info , " rpc failed : { 0 } " , new object [ ] { status runtime exception get status ( ) } ) ; } }


sets the visitor information of the visitor accepter

public void set visitor info ( object visitor info ) ;


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


returns the fixed expiration policy for the given parameter

private static policy expiration < integer , integer > expiration policy ( parameter parameter , cache < integer , integer > cache ) { if ( parameter is annotation present ( expire after access class ) ) { return cache policy ( ) expire after access ( ) get ( ) ; } else if ( parameter is annotation present ( expire after write class ) ) { return cache policy ( ) expire after write ( ) get ( ) ; } else if ( parameter is annotation present ( refresh after write class ) ) { return cache policy ( ) refresh after write ( ) get ( ) ; } throw new assertion error ( " expiration parameter must have a qualifier annotation " ) ; }


public string get first name ( ) { return first name ; }


encode a stream of objects of type { @ code t } into a { @ link data buffer } output stream

flux < data buffer > encode ( publisher < ? extends t > input stream , data buffer factory buffer factory , resolvable type element type , @ nullable mime type mime type , @ nullable map < string , object > hints ) ;


create a snapshot of the given path it is assumed that the caller will perform synchronization

public string create snapshot ( final lease manager lease manager , final i nodes in path iip , string snapshot root , string snapshot name , long mtime ) throws i o exception { i node directory src root = get snapshottable root ( iip ) ; if ( snapshot counter = = get max snapshot i d ( ) ) { / / we have reached the maximum allowable snapshot id and since we don ' t / / handle rollover we will fail all subsequent snapshot creation / / requests throw new snapshot exception ( " failed to create the snapshot the file system has run out of " + " snapshot i ds and id rollover is not supported " ) ; } int n = num snapshots get ( ) ; check file system snapshot limit ( n ) ; src root add snapshot ( this , snapshot name , lease manager , mtime ) ; / / create success , update id snapshot counter + + ; num snapshots get and increment ( ) ; return snapshot get snapshot path ( snapshot root , snapshot name ) ; }


used to add a new inserted row while do multi - row insert

public t add row ( ) { sql ( ) values list add ( new array list < > ( ) ) ; return get self ( ) ; }


assert that a path exists - but make no assertions as to the type of that entry

public static void assert path exists ( file system file system , string message , path path ) throws i o exception { try { file system get file status ( path ) ; } catch ( file not found exception e ) { / / failure , report it throw ( i o exception ) new file not found exception ( message + " : not found " + path + " in " + path get parent ( ) + " : " + e + " - - " + ls ( file system , path get parent ( ) ) ) init cause ( e ) ; } }


replaces the instruction at a given offset by a given push instruction

private void replace instruction ( clazz clazz , int offset , instruction instruction , instruction replacement instruction ) { / / pop unneeded stack entries if necessary int pop count = instruction stack pop count ( clazz ) - replacement instruction stack pop count ( clazz ) ; insert pop instructions ( offset , pop count ) ; if ( debug ) system out println ( " replacing instruction " + instruction to string ( offset ) + " - > " + replacement instruction to string ( ) + ( pop count = = 0 ? " " : " ( " + pop count + " pops ) " ) ) ; code attribute editor replace instruction ( offset , replacement instruction ) ; / / visit the instruction , if required if ( extra instruction visitor ! = null ) { / / note : we ' re not passing the right arguments for now , knowing that / / they aren ' t used anyway instruction accept ( clazz , null , null , offset , extra instruction visitor ) ; } }


this is purely to allow unit tests to inspect the partial grok pattern after testing implementation details it should not be used in production code

string builder get overall grok pattern builder ( ) { return overall grok pattern builder ; }


test when number of live nodes are less than the " dfs client block write replace - datanode - on - failure min replication "

public void test less number of live datanodes than write replace datanode on failure r f ( ) throws exception { final mini d f s cluster cluster = setup cluster ( 2 ) ; try { final distributed file system fs = cluster get file system ( ) ; final path dir = new path ( dir ) ; final slow writer [ ] slowwriters = new slow writer [ 1 ] ; for ( int i = 1 ; i < = slowwriters length ; i + + ) { / / create slow writers in different speed slowwriters [ i - 1 ] = new slow writer ( fs , new path ( dir , " file " + i ) , i * 200l ) ; } for ( slow writer s : slowwriters ) { s start ( ) ; } / / let slow writers write something / / some of them are too slow and will be not yet started sleep seconds ( 1 ) ; / / stop an old datanode cluster stop data node ( 0 ) ; cluster stop data node ( 0 ) ; / / let the slow writer writes a few more seconds / / everyone should have written something sleep seconds ( 20 ) ; / / check replication and interrupt for ( slow writer s : slowwriters ) { try { s out get current block replication ( ) ; assert fail ( " must throw exception as failed to add a new datanode for write " + " pipeline , minimum failure replication " ) ; } catch ( i o exception e ) { / / expected } s interrupt running ( ) ; } / / close files for ( slow writer s : slowwriters ) { s join and close ( ) ; } / / verify the file verify file content ( fs , slowwriters ) ; } finally { if ( cluster ! = null ) { cluster shutdown ( ) ; } } }


visits the given runtime visible annotations attribute of any type of class member

public void visit runtime visible annotations attribute ( clazz clazz , member member , runtime visible annotations attribute runtime visible annotations attribute ) { visit runtime visible annotations attribute ( clazz , runtime visible annotations attribute ) ; }


convenience shorthand for { @ link # add group identity link ( string , string , string ) } ; with type { @ link identity link type # candidate }

void add participant group ( string process instance id , string group id ) ;


start a new write operation on the file this returns an { @ link output stream } to which you can write the new file data if the whole data is written successfully you must call { @ link # end write ( output stream ) } on failure you should call { @ link output stream # close ( ) } only to free up resources used by it example usage : data output stream data output = null ; try { output stream output stream = atomic file start write ( ) ; data output = new data output stream ( output stream ) ; wrapper stream data output write ( data 1 ) ; data output write ( data 2 ) ; atomic file end write ( data output ) ; pass wrapper stream } finally { if ( data output ! = null ) { data output close ( ) ; } } note that if another thread is currently performing a write , this will simply replace whatever that thread is writing with the new file being written by this thread , and when the other thread finishes the write the new write operation will no longer be safe ( or will be lost ) you must do your own threading protection for access to atomic file

public output stream start write ( ) throws i o exception { / / rename the current file so it may be used as a backup during the next read if ( base name exists ( ) ) { if ( ! backup name exists ( ) ) { if ( ! base name rename to ( backup name ) ) { log w ( tag , " couldn ' t rename file " + base name + " to backup file " + backup name ) ; } } else { base name delete ( ) ; } } output stream str ; try { str = new atomic file output stream ( base name ) ; } catch ( file not found exception e ) { file parent = base name get parent file ( ) ; if ( parent = = null | | ! parent mkdirs ( ) ) { throw new i o exception ( " couldn ' t create " + base name , e ) ; } / / try again now that we ' ve created the parent directory try { str = new atomic file output stream ( base name ) ; } catch ( file not found exception e 2 ) { throw new i o exception ( " couldn ' t create " + base name , e 2 ) ; } } return str ; }


tests that removed partitions will not be removed from subscribed partitions even if it ' s still in restored partitions ( filter restored partitions with discovered is disabled )

public void test disable filter restored paritions with removed topic ( ) throws exception { check filter restored partitions with disovered ( arrays as list ( new string [ ] { " kafka topic 1 " , " kafka topic 2 " } ) , arrays as list ( new string [ ] { " kafka topic 1 " } ) , arrays as list ( new string [ ] { " kafka topic 1 " , " kafka topic 2 " } ) , true ) ; }


returns the node that is first , with first being currently defined to be the one that is first when sorted by id alphabetically

public attributed vertex get first ( ) { return first ; }


list < transform > get transformers ( ) ;


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


return the set of leaf level queues configured in the system to which jobs are submitted the number of queues configured should be dependent on the scheduler configured note that some schedulers work with only one queue , whereas others can support multiple queues

public synchronized set < string > get leaf queue names ( ) { return leaf queues key set ( ) ; }


public void 1 2 3number test ( ) { / / todo : test 1 2 3number }


value from { @ link thread pool executor # get core pool size ( ) }

public number get current core pool size ( ) { return thread pool get core pool size ( ) ; }


build a backfill record to attach to a successful resolution result

public static assembly resolved backfill backfill ( pattern expression exp , masked long goal , map < integer , object > res , int inslen , string description ) { return new assembly resolved backfill ( description , exp , goal , res , inslen , 0 ) ; }


partitioning < code > a = { a 1 , a n } < code > is considered as a refined partitioning over partitioning < code > b = { b 1 , b m } < code > if : n > = m for every partition < code > b i < code > in partitioning < code > b < code > , the rows it contains is the same as union of a set of partitions < code > a { i 1 } , a { i 2 } , a { i k } < code > in partitioning < code > a < code > , i e < code > b i = a { i 1 } + a { i 2 } + + a { i k } < code > connector can transparently convert partitioning < code > a < code > to partitioning < code > b < code > associated with the provided table layout handle for example , consider two partitioning over < code > order < code > table : partitioning < code > a < code > has 256 partitions by < code > orderkey % 256 < code > partitioning < code > b < code > has 128 partitions by < code > orderkey % 128 < code > partitioning < code > a < code > is a refined partitioning over < code > b < code > if connector supports transparently convert < code > a < code > to < code > b < code > refined - over relation is reflexive this spi is unstable and subject to change in the future

default boolean is refined partitioning over ( connector session session , connector partitioning handle left , connector partitioning handle right ) { return left equals ( right ) ; }


public static void write schema ( csvout out ) throws i o exception { out write ( " id " , " starttime " , " success " , " started " , " ended " , " duration " , " error " ) ; }


reads a zero - compressed encoded long from input stream and returns it

public static long read v long ( data input stream ) throws i o exception { byte first byte = stream read byte ( ) ; int len = decode v int size ( first byte ) ; if ( len = = 1 ) { return first byte ; } long i = 0 ; for ( int idx = 0 ; idx < len - 1 ; idx + + ) { byte b = stream read byte ( ) ; i = i < < 8 ; i = i | ( b & 0x f f ) ; } return ( is negative v int ( first byte ) ? ( i ^ - 1l ) : i ) ; }


creates list of users with given input array

public void create users with list input test ( ) { list < user > body = null ; / / api create users with list input ( body ) ; / / todo : test validations }


teardown deletes the objects created before the superclass does the directory cleanup

public void teardown ( ) throws exception { if ( s 3client ! = null ) { delete object ( marker key ) ; delete object ( marker key slash ) ; delete object ( marker peer key ) ; delete object ( file key under marker ) ; } / / do this ourselves to avoid audits teardown failing / / when surplus markers are found delete test dir in teardown ( ) ; super teardown ( ) ; }


public static map < string , object > as map ( final serializable properties , final filter provider filter provider ) { try ( val writer = new string writer ( ) ) { val mapper = new y a m l mapper ( ) ; mapper set filter provider ( filter provider ) ; mapper set serialization inclusion ( json include include non null ) ; mapper set property naming strategy ( property naming strategy kebab case ) ; val module = new simple module ( ) ; module add serializer ( resource class , new resource serializer ( ) ) ; mapper register module ( module ) ; mapper write value ( writer , properties ) ; val resource = new byte array resource ( writer to string ( ) get bytes ( standard charsets utf 8 ) ) ; return cas core configuration utils load yaml properties ( resource ) ; } }


public void set filter settings ( map < string , integer > filter settings ) { this filter settings = filter settings ; }


public final native string get name ( ) / * - { return this name ; }


parse the sas expiry from the sas token the sas expiry is the minimum of the ske and se parameters the se parameter is required and the ske parameter is optional

private static offset date time get expiry ( string token ) { / / return min for all invalid input , including a null token if ( token = = null ) { return offset date time min ; } string signed expiry = " se = " ; int signed expiry len = 3 ; int start = token index of ( signed expiry ) ; / / return min if the required se parameter is absent if ( start = = - 1 ) { return offset date time min ; } start + = signed expiry len ; / / extract the value of se parameter int end = token index of ( " & " , start ) ; string se value = ( end = = - 1 ) ? token substring ( start ) : token substring ( start , end ) ; try { se value = u r l decoder decode ( se value , " utf - 8 " ) ; } catch ( unsupported encoding exception ex ) { log error ( " error decoding se query parameter ( { } ) from sas " , se value , ex ) ; return offset date time min ; } / / parse the iso 8601 date value ; return min if invalid offset date time se date = offset date time min ; try { se date = offset date time parse ( se value , date time formatter iso date time ) ; } catch ( date time parse exception ex ) { log error ( " error parsing se query parameter ( { } ) from sas " , se value , ex ) ; } string signed key expiry = " ske = " ; int signed key expiry len = 4 ; / / if ske is present , the sas expiry is the minimum of ske and se start = token index of ( signed key expiry ) ; / / return se date if ske is absent if ( start = = - 1 ) { return se date ; } start + = signed key expiry len ; / / extract the value of ske parameter end = token index of ( " & " , start ) ; string ske value = ( end = = - 1 ) ? token substring ( start ) : token substring ( start , end ) ; try { ske value = u r l decoder decode ( ske value , " utf - 8 " ) ; } catch ( unsupported encoding exception ex ) { log error ( " error decoding ske query parameter ( { } ) from sas " , ske value , ex ) ; return offset date time min ; } / / parse the iso 8601 date value ; return min if invalid offset date time ske date = offset date time min ; try { ske date = offset date time parse ( ske value , date time formatter iso date time ) ; } catch ( date time parse exception ex ) { log error ( " error parsing ske query parameter ( { } ) from sas " , ske value , ex ) ; return offset date time min ; } return ske date is before ( se date ) ? ske date : se date ; }


public int get register count ( ) { return 0 ; }


post usercreate with list : creates list of users with given input array

default mono < response entity < void > > create users with list input ( @ api param ( value = " list of user object " , required = true ) @ valid @ request body flux < user > body , @ api ignore final server web exchange exchange ) { return get delegate ( ) create users with list input ( body , exchange ) ; }


updates this hasher with { @ code len } bytes starting at { @ code off } in the given buffer

protected void update ( byte [ ] b , int off , int len ) { for ( int i = off ; i < off + len ; i + + ) { update ( b [ i ] ) ; } }


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


private void add target ( transitive info collection dep ) { for ( artifact artifact : file type filter list ( dep get provider ( file provider class ) get files to build ( ) to list ( ) , cpp file types shared library ) ) { builder add ( library to link builder ( ) set library identifier ( cc linking outputs library identifier of ( artifact ) ) set dynamic library ( artifact ) build ( ) ) ; } }


tests the independence of the writer index via { @ link read only sliced network buffer # set size ( int ) } , { @ link read only sliced network buffer # get size ( ) }

public void test get set size 2 ( ) { test get set size ( buffer read only slice ( 1 , 2 ) , 2 ) ; }


public void do rss ( stapler request req , stapler response rsp ) throws i o exception , servlet exception { do rss ( req , rsp , jenkins log records ) ; }


this is a spurious hash code subclass to keep findbugs quiet

public int hash code ( ) { return super hash code ( ) ; }


builds an instance of the filter with a provided authenticator , an authorizer , a prefix , and a realm

public t build auth filter ( ) { require non null ( realm , " realm is not set " ) ; require non null ( prefix , " prefix is not set " ) ; require non null ( authenticator , " authenticator is not set " ) ; require non null ( authorizer , " authorizer is not set " ) ; require non null ( unauthorized handler , " unauthorized handler is not set " ) ; final t auth filter = new instance ( ) ; auth filter authorizer = authorizer ; auth filter authenticator = authenticator ; auth filter prefix = prefix ; auth filter realm = realm ; auth filter unauthorized handler = unauthorized handler ; return auth filter ; }


protected synchronized list < r m container > get launched containers ( ) { list < r m container > result = new array list < > ( ) ; for ( container info info : launched containers values ( ) ) { result add ( info container ) ; } return result ; }


get the count of " 102 " triads which have one bidirectional edge among the vertices

public big integer get count 1 0 2 ( ) { return counts [ 2 ] ; }


defines that the value of the option should be of { @ link string } type

public typed config option builder < string > string type ( ) { return new typed config option builder < > ( key , string class ) ; }


applies an aggregation that sums every window of the data stream at the given position

public single output stream operator < t > sum ( int position to sum ) { return aggregate ( new sum aggregator < > ( position to sum , input get type ( ) , input get execution config ( ) ) ) ; }


returns an immutable list with all alternative snapshots to restore the managed operator state , in the order in which we should attempt to restore

public list < state object collection < operator state handle > > get prioritized managed operator state ( ) { return prioritized managed operator state ; }


public void find usages ( ) { if ( field ids = = null | | method ids = = null ) { return ; } for ( class def class def : dex class defs ( ) ) { current class = class def ; current method = null ; if ( class def get class data offset ( ) = = 0 ) { continue ; } class data class data = dex read class data ( class def ) ; for ( class data field field : class data all fields ( ) ) { int field index = field get field index ( ) ; if ( field ids contains ( field index ) ) { out println ( location ( ) + " field declared " + dex field ids ( ) get ( field index ) ) ; } } for ( class data method method : class data all methods ( ) ) { current method = method ; int method index = method get method index ( ) ; if ( method ids contains ( method index ) ) { out println ( location ( ) + " method declared " + dex method ids ( ) get ( method index ) ) ; } if ( method get code offset ( ) ! = 0 ) { code reader visit all ( dex read code ( method ) get instructions ( ) ) ; } } } current class = null ; current method = null ; }


creates a rule instance that initiates & # 064 ; mocks and is a { @ link test rule } use this method only when you need to explicitly need a { @ link test rule } , for example if you need to compose multiple rules using a { @ link org junit rules rule chain } otherwise , always prefer { @ link # rule ( ) } see { @ link mockito rule }

public static mockito test rule test rule ( object test instance ) { return new j unit test rule ( plugins get mockito logger ( ) , strictness warn , test instance ) ; }


returns the owner type of a { @ link parameterized type } or enclosing class of a { @ link class } , or null otherwise

private type get owner type if present ( ) { if ( runtime type instanceof parameterized type ) { return ( ( parameterized type ) runtime type ) get owner type ( ) ; } else if ( runtime type instanceof class < ? > ) { return ( ( class < ? > ) runtime type ) get enclosing class ( ) ; } else { return null ; } }


parses h base { @ link result } into { @ link row }

public row parse to row ( result result , object row key ) { for ( int i = 0 ; i < field length ; i + + ) { if ( row key index = = i ) { result row set field ( row key index , row key ) ; } else { int f = ( row key index ! = - 1 & & i > row key index ) ? i - 1 : i ; / / get family key byte [ ] family key = families [ f ] ; row family row = family rows [ f ] ; for ( int q = 0 ; q < this qualifiers [ f ] length ; q + + ) { / / get quantifier key byte [ ] qualifier = qualifiers [ f ] [ q ] ; / / get quantifier type idx int type idx = qualifier types [ f ] [ q ] ; / / read value byte [ ] value = result get value ( family key , qualifier ) ; if ( value ! = null ) { family row set field ( q , h base type utils deserialize to object ( value , type idx , charset ) ) ; } else { family row set field ( q , null ) ; } } result row set field ( i , family row ) ; } } return result row ; }


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


registers a new { @ link com bumptech glide load data data rewinder factory } to handle a non - default data type that can be rewind to allow for efficient reads of file headers

public registry register ( @ non null data rewinder factory < ? > factory ) { data rewinder registry register ( factory ) ; return this ; }


remove all values for the given key without returning them this is a minor performance optimization if you do not need the previous values

public < t > void discard all ( key < t > key ) { if ( is empty ( ) ) { return ; } int write idx = 0 ; int read idx = 0 ; for ( ; read idx < size ; read idx + + ) { if ( bytes equal ( key ascii name ( ) , name ( read idx ) ) ) { continue ; } name ( write idx , name ( read idx ) ) ; value ( write idx , value ( read idx ) ) ; write idx + + ; } int new size = write idx ; / / multiply by two since names and values is interleaved arrays fill ( names and values , write idx * 2 , len ( ) , null ) ; size = new size ; }


logs user into the system ( asynchronously )

public okhttp 3 call login user async ( string username , string password , final api callback < string > callback ) throws api exception { okhttp 3 call local var call = login user validate before call ( username , password , callback ) ; type local var return type = new type token < string > ( ) { } get type ( ) ; local var api client execute async ( local var call , local var return type , callback ) ; return local var call ; }


executes the extraction on the existing content of the json parser and outputs the match < p > notes : json parser must be on the first token of the value to be processed when extract is called invariant : when extract ( ) returns , the current token of the parser will be the last token of the value

t extract ( json parser json parser ) throws i o exception ;


{ @ inherit doc } the default implementation does nothing

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


sets whether a cross - origin request will include credentials only used on gwt backend to allow cross - origin requests to include credentials such as cookies , authorization headers , etc

public void set include credentials ( boolean include credentials ) { this include credentials = include credentials ; }


returns a new { @ link simple attribute set } with the following default attributes set : font family : " tahoma " font size : 11 bold : true

protected simple attribute set create attribute set ( color color ) { simple attribute set attr set = new simple attribute set ( ) ; attr set add attribute ( style constants font family , " tahoma " ) ; attr set add attribute ( style constants font size , integer value of ( 11 ) ) ; attr set add attribute ( style constants bold , boolean true ) ; attr set add attribute ( style constants foreground , color ) ; return attr set ; }


default parameters suitable for most subclasses see example usage in { @ link x 5 0 9 util test }

public static stream < arguments > data ( ) { array list < arguments > result = new array list < > ( ) ; int param index = 0 ; for ( x 5 0 9 key type ca key type : x 5 0 9 key type values ( ) ) { for ( x 5 0 9 key type cert key type : x 5 0 9 key type values ( ) ) { for ( string key password : new string [ ] { " " , " pa $ $ w 0rd " } ) { result add ( arguments of ( ca key type , cert key type , key password , param index + + ) ) ; } } } return result stream ( ) ; }


add a to - be - deleted block into the { @ link blocks map update info # to delete list }

public void add delete block ( block info to delete ) { assert to delete ! = null : " to delete is null " ; to delete delete ( ) ; to delete list add ( to delete ) ; / / if the file is being truncated / / the copy - on - truncate block should also be collected for deletion block under construction feature uc = to delete get under construction feature ( ) ; if ( uc = = null ) { return ; } block info truncate block = uc get truncate block ( ) ; if ( truncate block = = null | | truncate block equals ( to delete ) ) { return ; } add delete block ( truncate block ) ; }


private patch info process bundle patch ( patch info his patch info , list < bundle patch > bundle patchs , file cur t patch unzip folder ) throws i o exception , patch exception { string patch name = " patch - " + current build patch info get patch version ( ) + " @ " + his patch info get patch version ( ) ; patch info patch info = new patch info ( ) ; patch info set file name ( patch name + " tpatch " ) ; patch info set target version ( his patch info get patch version ( ) ) ; patch info set patch version ( current build patch info get patch version ( ) ) ; file his t patch file = new file ( t patch tmp folder , his patch info get patch version ( ) + " - download tpatch " ) ; file his t patch unzip folder = new file ( t patch tmp folder , his patch info get patch version ( ) ) ; file dest t path tmp folder = new file ( t patch tmp folder , patch name ) ; if ( ! dest t path tmp folder exists ( ) ) { dest t path tmp folder mkdirs ( ) ; } file info file = new file ( dest t path tmp folder , " patch info " ) ; file utils write string to file ( info file , patch name ) ; for ( bundle patch bundle patch : bundle patchs ) { boolean add to patch = true ; string bundle name = " lib " + bundle patch pkg name replace ( ' ' , ' ' ) ; if ( bundle patch main bundle ) { continue ; } else if ( no patch bundles contains ( bundle patch pkg name ) ) { file current bundle = new file ( cur t patch unzip folder , " lib " + bundle patch pkg name replace ( " " , " " ) + " so " ) ; if ( ! current bundle exists ( ) ) { continue ; } file utils copy file to directory ( current bundle , dest t path tmp folder ) ; patch bundle info patch bundle info = new patch bundle info ( ) ; patch bundle info set application name ( bundle patch application name ) ; patch bundle info set artifact id ( bundle patch artifact id ) ; patch bundle info set main bundle ( false ) ; patch bundle info set src unit tag ( bundle patch src unit tag ) ; patch bundle info set unit tag ( bundle patch unit tag ) ; patch bundle info set new bundle ( bundle patch new bundle ) ; patch bundle info set name ( bundle name ) ; patch bundle info set pkg name ( bundle patch pkg name ) ; patch bundle info set version ( bundle patch version ) ; patch bundle info set base version ( bundle patch base version ) ; patch bundle info set dependency ( bundle patch dependency ) ; patch info get bundles ( ) add ( patch bundle info ) ; continue ; } file cur bundle folder = new file ( cur t patch unzip folder , bundle name ) ; file bundle dest folder = new file ( dest t path tmp folder , bundle name ) ; patch bundle info patch bundle info = new patch bundle info ( ) ; patch bundle info set application name ( bundle patch application name ) ; patch bundle info set artifact id ( bundle patch artifact id ) ; patch bundle info set src unit tag ( bundle patch src unit tag ) ; patch bundle info set main bundle ( false ) ; patch bundle info set unit tag ( bundle patch unit tag ) ; patch bundle info set reset ( bundle patch reset ) ; patch bundle info set new bundle ( bundle patch new bundle ) ; patch bundle info set name ( bundle name ) ; patch bundle info set pkg name ( bundle patch pkg name ) ; patch bundle info set version ( bundle patch version ) ; patch bundle info set base version ( bundle patch base version ) ; patch bundle info set dependency ( bundle patch dependency ) ; switch ( bundle patch bundle policy ) { case add : if ( bundle patch new bundle ) { file current bundle = new file ( cur t patch unzip folder , " lib " + bundle patch pkg name replace ( " " , " " ) + " so " ) ; file utils copy file to directory ( current bundle , t patch tmp folder ) ; } else { bundle dest folder mkdirs ( ) ; file utils copy directory ( cur bundle folder , bundle dest folder ) ; } break ; case remove : add to patch = false ; break ; / / donothing case rollback : / / donothing break ; case merge : file his bundle folder = new file ( his t patch unzip folder , bundle name ) ; file his bundle = new file ( his t patch unzip folder , " lib " + bundle patch pkg name replace ( " " , " " ) + " so " ) ; if ( ! his t patch file exists ( ) ) { if ( string utils is blank ( his patch info get download url ( ) ) & & new file ( t patch tool his tpatch folder , his patch info get file name ( ) ) exists ( ) ) { file his patch file = new file ( t patch tool his tpatch folder , his patch info get file name ( ) ) ; system out println ( " his patch file : " + his patch file get absolute path ( ) ) ; if ( his patch file exists ( ) ) { file utils copy file ( new file ( t patch tool his tpatch folder , his patch info get file name ( ) ) , his t patch file ) ; command utils exec ( t patch tmp folder , " unzip " + his patch file + " - d " + his t patch unzip folder get absolute path ( ) ) ; / / zip utils unzip ( his t patch file , his t patch unzip folder / / get absolute path ( ) ) ; } } else { download t path and unzip ( his patch info get download url ( ) , his t patch file , his t patch unzip folder ) ; / / file main dex file = new file ( his t patch unzip folder , " libcom taobao maindex so " ) ; / / if ( main dex file exists ( ) ) { / / try { / / system out println ( " start put bundle infos for version : " + his patch info get patch version ( ) + " " ) ; / / t patch tool bundle infos put ( his patch info get patch version ( ) , new atlas framework properties reader ( / / new method reader ( / / new class reader ( / / new dex reader ( main dex file ) ) ) , t patch tool bundle infos get ( current build patch info get patch version ( ) ) ) read ( " landroid / taobao / atlas / framework / framework properties ; " , " < clinit > " ) ) ; / / } catch ( exception e ) { / / e print stack trace ( ) ; / / } / / } } } if ( ! his bundle folder exists ( ) & & ! his bundle exists ( ) ) { throw new i o exception ( his bundle folder get absolute path ( ) + " is not exist in history bundle ! " ) ; } else if ( his bundle exists ( ) & & bundle patch bundle policy = = bundle policy merge ) { file current bundle = new file ( cur t patch unzip folder , " lib " + bundle patch pkg name replace ( " " , " " ) + " so " ) ; if ( current bundle exists ( ) & & awb maps get ( bundle patch artifact id ) exists ( ) ) { file utils copy file to directory ( awb maps get ( bundle patch artifact id ) , dest t path tmp folder ) ; } } else { file full awb file = awb maps get ( bundle patch artifact id ) ; if ( full awb file = = null ) { system out println ( bundle patch artifact id + " is not exits ! " ) ; file utils copy directory ( cur bundle folder , bundle dest folder ) ; break ; } copy diff files ( full awb file , cur bundle folder , his bundle folder , bundle dest folder , patch bundle info get src unit tag ( ) equals ( patch bundle info get unit tag ( ) ) ) ; if ( ! bundle dest folder exists ( ) | | file utils list files ( bundle dest folder , null , true ) size ( ) = = 0 ) { if ( patch bundle info get unit tag ( ) equals ( patch bundle info get src unit tag ( ) ) ) { add to patch = false ; } else { / / throw new patch exception ( patch name + " : " + patch bundle info get pkg name ( ) + " , " + patch bundle info get unit tag ( ) + " , " + patch bundle info get src unit tag ( ) + " , ， ! " ) ; patch bundle info set inherit ( true ) ; } } } break ; } if ( add to patch & & patch bundle info get unit tag ( ) equals ( patch bundle info get src unit tag ( ) ) ) { if ( his patch info get patch version ( ) split ( " \ \ " ) length = = 3 ) { throw new patch exception ( patch name + patch bundle info get pkg name ( ) + " in patch srcunittag equals unittag , " + patch bundle info get unit tag ( ) + " , please upgrade bundle version and reintegration ! " ) ; } else { system err println ( patch name + patch bundle info get pkg name ( ) + " in patch srcunittag equals unittag , " + patch bundle info get unit tag ( ) + " , please upgrade bundle version and reintegration ! " ) ; } } else if ( add to patch ) { patch info get bundles ( ) add ( patch bundle info ) ; } } return patch info ; }


returns a range , closed on both ends , whose endpoints are the minimum and maximum values contained in this set this is equivalent to { @ code range ( closed , closed ) }


construct a target completion event for a failed target , with the given non - empty root causes

public static target complete event create failed ( configured target and data ct , completion context completion context , nested set < cause > root causes , nested set < artifacts in output group > outputs ) { preconditions check argument ( ! root causes is empty ( ) ) ; return new target complete event ( ct , root causes , completion context , outputs , false ) ; }


static public boolean is equal ( float a , float b , float tolerance ) { return math abs ( a - b ) < = tolerance ; }


configures the pool as a single connection pool it ' s useful for tools that use only one database connection , such as database migrations


public completable future < user > get user by name ( string username ) throws api exception { try { http request builder local var request builder = get user by name request builder ( username ) ; return member var http client send async ( local var request builder build ( ) , http response body handlers of string ( ) ) then compose async ( local var response - > { if ( local var response status code ( ) / 100 ! = 2 ) { return completable future failed future ( get api exception ( " get user by name " , local var response ) ) ; } try { return completable future completed future ( member var object mapper read value ( local var response body ( ) , new type reference < user > ( ) { } ) ) ; } catch ( i o exception e ) { return completable future failed future ( new api exception ( e ) ) ; } } ) ; } catch ( api exception e ) { return completable future failed future ( e ) ; } }


get the list of pipelines that were a part of this response the pipeline id can be obtained using get id on the pipeline configuration object

public list < pipeline configuration > pipelines ( ) { return collections unmodifiable list ( pipelines ) ; }


public big decimal get attribute number ( ) { return attribute number ; }


gets whether this instance has the name of a standard class initialization method this is just a convenient shorthand for { @ code get name ( ) get string ( ) equals ( " < clinit > " ) }

public final boolean is class init ( ) { return name get string ( ) equals ( " < clinit > " ) ; }


find commonalities between the given comparison in the given list the method can be applied both for conjunctive ( and ) or disjunctive purposes ( or )

private static boolean find existing comparison ( binary comparison main , list < binary comparison > bcs , boolean conjunctive ) { object value = main right ( ) fold ( ) ; / / nb : the loop modifies the list ( hence why the int is used ) for ( int i = 0 ; i < bcs size ( ) ; i + + ) { binary comparison other = bcs get ( i ) ; / / skip if cannot evaluate if ( ! other right ( ) foldable ( ) ) { continue ; } / / if bc is a higher / lower value or gte vs gt , use it instead if ( ( other instanceof greater than | | other instanceof greater than or equal ) & & ( main instanceof greater than | | main instanceof greater than or equal ) ) { if ( main left ( ) semantic equals ( other left ( ) ) ) { integer compare = binary comparison compare ( value , other right ( ) fold ( ) ) ; if ( compare ! = null ) { / / and if ( ( conjunctive & & / / a > 3 and a > 2 - > a > 3 ( compare > 0 | | / / a > 2 and a > = 2 - > a > 2 ( compare = = 0 & & main instanceof greater than & & other instanceof greater than or equal ) ) ) | | / / or ( ! conjunctive & & / / a > 2 or a > 3 - > a > 2 ( compare < 0 | | / / a > = 2 or a > 2 - > a > = 2 ( compare = = 0 & & main instanceof greater than or equal & & other instanceof greater than ) ) ) ) { bcs remove ( i ) ; bcs add ( i , main ) ; } / / found a match return true ; } return false ; } } / / if bc is a lower / higher value or lte vs lt , use it instead else if ( ( other instanceof less than | | other instanceof less than or equal ) & & ( main instanceof less than | | main instanceof less than or equal ) ) { if ( main left ( ) semantic equals ( other left ( ) ) ) { integer compare = binary comparison compare ( value , other right ( ) fold ( ) ) ; if ( compare ! = null ) { / / and if ( ( conjunctive & & / / a < 2 and a < 3 - > a < 2 ( compare < 0 | | / / a < 2 and a < = 2 - > a < 2 ( compare = = 0 & & main instanceof less than & & other instanceof less than or equal ) ) ) | | / / or ( ! conjunctive & & / / a < 2 or a < 3 - > a < 3 ( compare > 0 | | / / a < = 2 or a < 2 - > a < = 2 ( compare = = 0 & & main instanceof less than or equal & & other instanceof less than ) ) ) ) { bcs remove ( i ) ; bcs add ( i , main ) ; } / / found a match return true ; } return false ; } } } return false ; }


add a name of token filter that will be used on top of a tokenizer provided

public analyze request builder add token filter ( string token filter ) { request add token filter ( token filter ) ; return this ; }


check to see if a command needs to be executed and execute if needed

protected void run ( ) throws i o exception { if ( last time + interval > time current elapsed time ( ) ) { return ; } exit code = exit code execution finished get value ( ) ; / / reset for next run run command ( ) ; }


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


resolve the contextual object for the given key , if any e g the http servlet request object for key " request "

object resolve contextual object ( string key ) ;


closes the reader by closing the underlying { @ code input stream } and marking this reader as closed

public void close ( ) throws i o exception { synchronized ( in ) { if ( buf ! = null ) { buf = null ; in close ( ) ; } } }


reads lines through a v 2 record reader , as if it were part of a m rv 2 job

protected list < string > read records ( job conf conf , path path , string sql , record reader < ? , ? > reader , int initial capacity ) throws exception { input must ( conf , select sql , sql ) ; list < string > lines = new array list < > ( initial capacity ) ; try { reader initialize ( create split ( conf , path ) , create task attempt context ( conf ) ) ; while ( reader next key value ( ) ) { lines add ( reader get current value ( ) to string ( ) ) ; } } finally { reader close ( ) ; } return lines ; }


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


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


< code > optional aapt pb styled string styled str = 4 ; < code >

public boolean has styled str ( ) { return instance has styled str ( ) ; }


public void namespace string test ( ) { / / todo : test namespace string }


returns a string representation of { @ code x } for the given radix , where { @ code x } is treated as unsigned < b > java 8 users : < b > use { @ link long # to unsigned string ( long , int ) } instead

public static string to string ( long x , int radix ) { check argument ( radix > = character min radix & & radix < = character max radix , " radix ( % s ) must be between character min radix and character max radix " , radix ) ; if ( x = = 0 ) { / / simply return " 0 " return " 0 " ; } else if ( x > 0 ) { return long to string ( x , radix ) ; } else { char [ ] buf = new char [ 64 ] ; int i = buf length ; if ( ( radix & ( radix - 1 ) ) = = 0 ) { / / radix is a power of two so we can avoid division int shift = integer number of trailing zeros ( radix ) ; int mask = radix - 1 ; do { buf [ - - i ] = character for digit ( ( ( int ) x ) & mask , radix ) ; x > > > = shift ; } while ( x ! = 0 ) ; } else { / / separate off the last digit using unsigned division that will leave / / a number that is nonnegative as a signed integer long quotient ; if ( ( radix & 1 ) = = 0 ) { / / fast path for the usual case where the radix is even quotient = ( x > > > 1 ) / ( radix > > > 1 ) ; } else { quotient = divide ( x , radix ) ; } long rem = x - quotient * radix ; buf [ - - i ] = character for digit ( ( int ) rem , radix ) ; x = quotient ; / / simple modulo / division approach while ( x > 0 ) { buf [ - - i ] = character for digit ( ( int ) ( x % radix ) , radix ) ; x / = radix ; } } / / generate string return new string ( buf , i , buf length - i ) ; } }


get the r m node in the rm from the node identifier

private r m node get r m node ( final string node id ) { if ( node id = = null | | node id is empty ( ) ) { throw new not found exception ( " node id , " + node id + " , is empty or null " ) ; } node id nid = node id from string ( node id ) ; r m context rm context = this rm get r m context ( ) ; r m node ni = rm context get r m nodes ( ) get ( nid ) ; if ( ni = = null ) { ni = rm context get inactive r m nodes ( ) get ( nid ) ; if ( ni = = null ) { throw new not found exception ( " node id , " + node id + " , is not found " ) ; } } return ni ; }


test for the deprecated apply ( reducer , window function )

public void test apply with pre reducer event time ( ) throws exception { stream execution environment env = stream execution environment get execution environment ( ) ; data stream < tuple 2 < string , integer > > source = env from elements ( tuple 2 of ( " hello " , 1 ) , tuple 2 of ( " hello " , 2 ) ) ; dummy reducer reducer = new dummy reducer ( ) ; data stream < tuple 3 < string , string , integer > > window = source key by ( new tuple key selector ( ) ) window ( tumbling event time windows of ( time of ( 1 , time unit seconds ) ) ) apply ( reducer , new window function < tuple 2 < string , integer > , tuple 3 < string , string , integer > , string , time window > ( ) { private static final long serial version u i d = 1l ; @ override public void apply ( string key , time window window , iterable < tuple 2 < string , integer > > values , collector < tuple 3 < string , string , integer > > out ) throws exception { for ( tuple 2 < string , integer > in : values ) { out collect ( new tuple 3 < > ( in f 0 , in f 0 , in f 1 ) ) ; } } } ) ; one input transformation < tuple 2 < string , integer > , tuple 3 < string , string , integer > > transform = ( one input transformation < tuple 2 < string , integer > , tuple 3 < string , string , integer > > ) window get transformation ( ) ; one input stream operator < tuple 2 < string , integer > , tuple 3 < string , string , integer > > operator = transform get operator ( ) ; assert assert true ( operator instanceof window operator ) ; window operator < string , tuple 2 < string , integer > , ? , ? , ? > win operator = ( window operator < string , tuple 2 < string , integer > , ? , ? , ? > ) operator ; assert assert true ( win operator get trigger ( ) instanceof event time trigger ) ; assert assert true ( win operator get window assigner ( ) instanceof tumbling event time windows ) ; assert assert true ( win operator get state descriptor ( ) instanceof reducing state descriptor ) ; process element and ensure output ( operator , win operator get key selector ( ) , basic type info string type info , new tuple 2 < > ( " hello " , 1 ) ) ; }


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


set an offset in dp that allows the user to drag the chart over it ' s bounds on the y - axis

public void set drag offset y ( float offset ) { m view port handler set drag offset y ( offset ) ; }


resolve the specified cached method argument or field value

private object resolved cached argument ( @ nullable string bean name , @ nullable object cached argument ) { if ( cached argument instanceof dependency descriptor ) { dependency descriptor descriptor = ( dependency descriptor ) cached argument ; assert state ( this bean factory ! = null , " no bean factory available " ) ; return this bean factory resolve dependency ( descriptor , bean name , null , null ) ; } else { return cached argument ; } }


this constraint generalizes the cardinality and target constraints consider a set of nodes n that belongs to the scope specified in the constraint if the target expressions are satisfied at least min cardinality times and at most max cardinality times in the node set n , then the constraint is satisfied for example , { @ code target cardinality ( rack , 2 , 10 , allocation tag ( " zk " ) ) } , requires an allocation to be placed within a rack that has at least 2 and at most 10 other allocations with tag " zk "

public static abstract constraint target cardinality ( string scope , int min cardinality , int max cardinality , target expression target expressions ) { return new single constraint ( scope , min cardinality , max cardinality , target expressions ) ; }


after read a page , we may need some initialization


creates data structures for the specified common information entry ( cie ) and its frame description entries ( f d es ) as indicated by the regions

protected void create augmentation data ( list < region descriptor > regions , cie cie ) { for ( region descriptor region : regions ) { frame description entry frame = region get frame descriptor entry ( ) ; address aug data ex addr = frame get augmentation ex data address ( ) ; if ( aug data ex addr equals ( address no address ) ) { continue ; } address addr = aug data ex addr ; memory block block = program get memory ( ) get block ( aug data ex addr ) ; int len = 0 ; int alignment = cie get code alignment ( ) ; do { len + = alignment ; addr = addr add ( alignment ) ; } while ( program get symbol table ( ) get primary symbol ( addr ) = = null & & block contains ( addr ) ) ; if ( len > 0 ) { create array cmd array cmd = new create array cmd ( aug data ex addr , len , new byte data type ( ) , 1 ) ; array cmd apply to ( program ) ; } } }