scoring mechanism : determines destination similarity and confidence for each of the source neighbors and if similarity passes the threshold and confidence passes minbits , then v t match info will be created and added to the result

private list < v t match info > transform ( v t match set match set , function destination function , l s h cosine vector accum destination vector , hash map < address , dominant pair < double , vector compare > > neighbors , double similarity threshold , double minbits , task monitor monitor ) { boolean refine result = get options ( ) get boolean ( refine results , refine results default ) ; address destination address = destination function get entry point ( ) ; int destination length = ( int ) destination function get body ( ) get num addresses ( ) ; list < v t match info > result = new array list < > ( ) ; for ( entry < address , dominant pair < double , vector compare > > neighbor : neighbors entry set ( ) ) { if ( monitor is cancelled ( ) ) { break ; } address source addr = neighbor get key ( ) ; / * compare using l s h cosine vector compare function * - - > similarity is the normalized dot product of the two vectors * / double similarity = neighbor get value ( ) first ; vector compare veccompare = neighbor get value ( ) second ; veccompare fill out ( ) ; double confidence = veccompare dotproduct ; if ( similarity < similarity threshold | | double is na n ( similarity ) ) { continue ; } if ( confidence < minbits ) { continue ; } confidence * = 10 0 ; / / remove when getting rid of log 1 0 stuff v t match info match = new v t match info ( match set ) ; function source function = source listing get function at ( source addr ) ; address source address = source function get entry point ( ) ; int source length = ( int ) source function get body ( ) get num addresses ( ) ; match set similarity score ( new v t score ( similarity ) ) ; match set confidence score ( new v t score ( confidence ) ) ; match set source length ( source length ) ; match set destination length ( destination length ) ; match set source address ( source address ) ; match set destination address ( destination address ) ; match set tag ( null ) ; match set association type ( v t association type function ) ; result add ( match ) ; } if ( refine result ) { result = refine ( result ) ; } return result ; }


sets the doc source of the update request to be used when the document does not exists the doc includes field and value pairs

public update request upsert ( x content type x content type , object source ) { safe upsert request ( ) source ( x content type , source ) ; return this ; }


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


post storeorder : place an order for a pet

com netflix hystrix hystrix command < response entity < order > > place order ( @ api param ( value = " order placed for purchasing the pet " , required = true ) @ valid @ request body order body ) ;


set final headers and fire a channel read event

protected void fire channel read ( channel handler context ctx , full http message msg , boolean release , http 2 stream stream ) { remove message ( stream , release ) ; http util set content length ( msg , msg content ( ) readable bytes ( ) ) ; ctx fire channel read ( msg ) ; }


sets the minimum and preferred resources for this contract instance the resource denotes how many memories and cpu cores of the user function will be consumed during the execution

public void set resources ( resource spec min resources , resource spec preferred resources ) { this min resources = min resources ; this preferred resources = preferred resources ; }


sets the state to state reading adts header

private void set reading adts header state ( ) { state = state reading adts header ; bytes read = 0 ; }


gets the instance field by the given name on the given object instance the value is a primitive wrapper if it is a primitive type note : if the field is static , then the < code > owner instance < code > field can be the class of the object that contains the variable

public static object get instance field ( string field name , object owner instance ) throws runtime exception { if ( owner instance = = null ) { throw new null pointer exception ( " owner of instance field cannot be null " ) ; } class < ? > object class = ( owner instance instanceof class ) ? ( class < ? > ) owner instance : owner instance get class ( ) ; object result = null ; try { / / get the field from the class object field field = reflection utilities locate field object on class ( field name , object class ) ; / / open up the field so that we have access field set accessible ( true ) ; / / get the field from the object instance that we were provided result = field get ( owner instance ) ; } catch ( exception e ) { throw new runtime exception ( " unable to use reflection to obtain " + " field : " + field name + " from class : " + object class , e ) ; } return result ; }


instrument a { @ litho handler } or returns the same given { @ litho handler } if the { @ litho handler } given as input is null , the return value will be null too

litho handler instrument litho handler ( litho handler litho handler ) ;


to each class , add the dispatch method called by the original code that acts as a trampoline to invoke the changed methods pseudo code : < code > object access $ dispatch ( string name , object [ ] args ) { if ( name equals ( " first method ( l $ type ; ljavalang string ; ljavalang object ; ) ljavalang object ; " ) ) { return first method ( ( $ type ) arg [ 0 ] , ( string ) arg [ 1 ] , arg [ 2 ] ) ; } if ( name equals ( " second method ( l $ type ; ljavalang string ; i ; ) v " ) ) { second method ( ( $ type ) arg [ 0 ] , ( string ) arg [ 1 ] , ( int ) arg [ 2 ] ) ; return ; } string builder $ local 1 = new string builder ( ) ; $ local 1 append ( " method not found " ) ; $ local 1 append ( name ) ; $ local 1 append ( " in " + visited class name + " $ dispatch implementation , restart the application " ) ; throw new $ package instant reload exception ( $ local 1 to string ( ) ) ; } < code >

private void add dispatch method ( ) { int access = opcodes acc public | opcodes acc varargs ; method m = new method ( " ipc $ dispatch " , " ( ljava / lang / string ; [ ljava / lang / object ; ) ljava / lang / object ; " ) ; method visitor visitor = super visit method ( access , m get name ( ) , m get descriptor ( ) , null , null ) ; final generator adapter mv = new generator adapter ( access , m , visitor ) ; if ( tracing enabled ) { mv push ( " redirecting " ) ; mv load arg ( 0 ) ; trace ( mv , 2 ) ; } list < method node > all methods = new array list < > ( ) ; / / if we are disabled , do not generate any dispatch , the method will throw an exception / / if invoked which should never happen if ( ! instant run disabled ) { / / noinspection unchecked all methods add all ( class node methods ) ; all methods add all ( added methods ) ; } final map < string , method node > methods = new hash map < > ( ) ; for ( method node method node : all methods ) { if ( method node name equals ( " < clinit > " ) | | method node name equals ( " < init > " ) ) { continue ; } if ( ! is access compatible with instant run ( method node access ) ) { continue ; } methods put ( method node name + " " + method node desc , method node ) ; } new string switch ( ) { @ override void visit string ( ) { mv visit var insn ( opcodes aload , 1 ) ; } @ override void visit case ( string method name ) { method node method node = methods get ( method name ) ; string name = method node name ; boolean is static = ( method node access & opcodes acc static ) ! = 0 ; string new desc = compute override method desc ( method node desc , is static ) ; if ( tracing enabled ) { trace ( mv , " m : " + name + " p : " + new desc ) ; } type [ ] args = type get argument types ( new desc ) ; int argc = 0 ; for ( type t : args ) { mv visit var insn ( opcodes aload , 2 ) ; mv push ( argc ) ; mv visit insn ( opcodes aaload ) ; byte code utils unbox ( mv , t ) ; argc + + ; } mv visit method insn ( opcodes invokestatic , visited class name + override suffix , is static ? compute override method name ( name , method node desc ) : name , new desc , false ) ; type ret = type get return type ( method node desc ) ; if ( ret get sort ( ) = = type void ) { mv visit insn ( opcodes aconst null ) ; } else { mv box ( ret ) ; } mv visit insn ( opcodes areturn ) ; } @ override void visit default ( ) { write missing message with hash ( mv , visited class name ) ; } } visit ( mv , methods key set ( ) ) ; mv visit maxs ( 0 , 0 ) ; mv visit end ( ) ; super visit end ( ) ; }


public void set flink collector ( collector < tuple 2 < key , value > > flink collector ) { this flink collector = flink collector ; }


returns an array of the relocations defined for this segment

public segment relocation [ ] get relocations ( ) { return relocations ; }


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


asynchronously create or modify a snapshot lifecycle definition see https : www elastic coguideenelasticsearchclientjava - restcurrent java - rest - high - ilm - slm - put - snapshot - lifecycle - policy html for more

public cancellable put snapshot lifecycle policy async ( put snapshot lifecycle policy request request , request options options , action listener < acknowledged response > listener ) { return rest high level client perform request async and parse entity ( request , index lifecycle request converters : : put snapshot lifecycle policy , options , acknowledged response : : from x content , listener , empty set ( ) ) ; }


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

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


adds the given raw sql string to the order by section do not use this for standard properties : order asc and order desc are preferred

public query builder < t > order raw ( string raw order ) { check order builder ( ) ; order builder append ( raw order ) ; return this ; }


when the request resources is the first in a stream , the initial resource versions must be populated otherwise , initial resource versions must be omitted the keys are the resources names of the mcp resources known to the mcp client the values in the map are the associated resource level version info < code > map & lt ; string , string & gt ; initial resource versions = 3 ; < code >

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


returns distinct namespaces for the given settings

public set < string > get namespaces ( settings settings ) { return settings key set ( ) stream ( ) filter ( this : : match ) map ( key : : get namespace ) collect ( collectors to set ( ) ) ; }


returns whether the given label is in the allowlist provided

public static boolean is available for allowlist ( transitive info collection allowlist , label relevant label ) { package specification provider package specification provider = allowlist get provider ( package specification provider class ) ; return is available for ( package specification provider get package specifications ( ) , relevant label ) ; }


set was loading to true so when the fragment on resume is called , the initial search is done

private void set search on resume ( ) { was loading set ( true ) ; }


get the current motor torque given the inverse time step , usually in n - m

public float get motor torque ( float inv dt ) { return jni get motor torque ( addr , inv dt ) ; }


public void upload file ( long pet id , string additional metadata , async file file , handler < async result < model api response > > result handler ) { upload file ( pet id , additional metadata , file , null , result handler ) ; }


invoked before the folders of an index are deleted from disk the list of folders contains { @ link path } s that may or may not exist on disk shard locks are expected to be acquired at the time this method is invoked

void before index folders deleted ( index index , index settings index settings , path [ ] index paths ) ;


returns a layered d b buffer object for the given database buffer id

d b buffer get buffer ( int buffer i d , d b buffer shadow buffer ) throws i o exception { if ( buffer i d > = 0 ) { return handle get buffer ( buffer i d , shadow buffer ) ; } return null ; }


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


replace fails when the given key is not present

public void test replace ( ) { concurrent map map = map 5 ( ) ; assert null ( map replace ( six , " z " ) ) ; assert false ( map contains key ( six ) ) ; }


create a new deadline that is offset from { @ code this } if the given offset is extraordinarily long , say 100 years , the actual deadline created might saturate

public deadline offset ( long offset , time unit units ) { / / may already be expired if ( offset = = 0 ) { return this ; } return new deadline ( ticker , deadline nanos , units to nanos ( offset ) , is expired ( ) ) ; }


set up the metrics system , start it , and return it

protected metrics system init metrics system ( string path , boolean ignore errors , boolean allow append , boolean use secure params ) { / / if the prefix is not lower case , the metrics system won ' t be able to / / read any of the properties string prefix = method name get method name ( ) to lower case ( ) ; config builder builder = new config builder ( ) add ( " * period " , 10000 ) add ( prefix + " sink mysink 0 class " , mock sink class get name ( ) ) add ( prefix + " sink mysink 0 basepath " , path ) add ( prefix + " sink mysink 0 source " , " testsrc " ) add ( prefix + " sink mysink 0 context " , " test 1 " ) add ( prefix + " sink mysink 0 ignore - error " , ignore errors ) add ( prefix + " sink mysink 0 allow - append " , allow append ) add ( prefix + " sink mysink 0 roll - offset - interval - millis " , 0 ) add ( prefix + " sink mysink 0 roll - interval " , " 1h " ) add ( " * queue capacity " , 2 ) ; if ( use secure params ) { builder add ( prefix + " sink mysink 0 keytab - key " , sink keytab file key ) add ( prefix + " sink mysink 0 principal - key " , sink principal key ) ; } builder save ( test metrics config get test filename ( " hadoop - metrics 2 - " + prefix ) ) ; metrics system impl ms = new metrics system impl ( prefix ) ; ms start ( ) ; return ms ; }


compacts ( garbage collects ) partition with copy - compact strategy using compaction partition

private void compact partition ( final int partition number ) throws i o exception { / / do nothing if table was closed , parameter is invalid or no garbage exists if ( this closed | | partition number > = this partitions size ( ) | | this partitions get ( partition number ) is compacted ( ) ) { return ; } / / release all segments owned by compaction partition this compaction memory clear all memory ( available memory ) ; this compaction memory allocate segments ( 1 ) ; this compaction memory push down pages ( ) ; t temp holder = this build side serializer create instance ( ) ; final int num partitions = this partitions size ( ) ; in memory partition < t > partition = this partitions remove ( partition number ) ; memory segment [ ] overflow segments = partition overflow segments ; long pointer ; int pointer offset ; int bucket offset ; final int buckets per segment = this buckets per segment mask + 1 ; for ( int i = 0 , bucket = partition number ; i < this buckets length & & bucket < this num buckets ; i + + ) { memory segment segment = this buckets [ i ] ; / / go over all buckets in the segment belonging to the partition for ( int k = bucket % buckets per segment ; k < buckets per segment & & bucket < this num buckets ; k + = num partitions , bucket + = num partitions ) { bucket offset = k * hash bucket size ; if ( ( int ) segment get ( bucket offset + header partition offset ) ! = partition number ) { throw new i o exception ( " accessed wrong bucket ! wanted : " + partition number + " got : " + segment get ( bucket offset + header partition offset ) ) ; } / / loop over all segments that are involved in the bucket ( original bucket plus / / overflow buckets ) int count in segment = segment get int ( bucket offset + header count offset ) ; int num in segment = 0 ; pointer offset = bucket offset + bucket pointer start offset ; while ( true ) { while ( num in segment < count in segment ) { pointer = segment get long ( pointer offset ) ; temp holder = partition read record at ( pointer , temp holder ) ; pointer = this compaction memory append record ( temp holder ) ; segment put long ( pointer offset , pointer ) ; pointer offset + = pointer len ; num in segment + + ; } / / this segment is done check if there is another chained bucket final long forward pointer = segment get long ( bucket offset + header forward offset ) ; if ( forward pointer = = bucket forward pointer not set ) { break ; } final int overflow seg num = ( int ) ( forward pointer > > > 32 ) ; segment = overflow segments [ overflow seg num ] ; bucket offset = ( int ) forward pointer ; count in segment = segment get int ( bucket offset + header count offset ) ; pointer offset = bucket offset + bucket pointer start offset ; num in segment = 0 ; } segment = this buckets [ i ] ; } } / / swap partition with compaction partition this compaction memory set partition number ( partition number ) ; this partitions add ( partition number , compaction memory ) ; this partitions get ( partition number ) overflow segments = partition overflow segments ; this partitions get ( partition number ) num overflow segments = partition num overflow segments ; this partitions get ( partition number ) next overflow bucket = partition next overflow bucket ; this partitions get ( partition number ) set is compacted ( true ) ; / / this partitions get ( partition number ) push down pages ( ) ; this compaction memory = partition ; this compaction memory reset record counter ( ) ; this compaction memory set partition number ( - 1 ) ; this compaction memory overflow segments = null ; this compaction memory num overflow segments = 0 ; this compaction memory next overflow bucket = 0 ; / / try to allocate maximum segment count this compaction memory clear all memory ( this available memory ) ; int max segment number = this get max partition ( ) ; this compaction memory allocate segments ( max segment number ) ; this compaction memory reset r w views ( ) ; this compaction memory push down pages ( ) ; }


customize the { @ link r socket strategies } allows further customization on { @ link r socket strategies } , mutating them if they were { @ link # rsocket strategies ( r socket strategies ) set } , or starting from { @ link r socket strategies # builder ( ) } defaults }

r socket requester builder rsocket strategies ( consumer < r socket strategies builder > configurer ) ;


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


ensure that { @ link reconfigurable base # start reconfiguration task } unsets the property in its parent ' s configuration when the new value is null

public void test conf is unset async ( ) throws reconfiguration exception , i o exception , timeout exception , interrupted exception { final string property = " foo " ; final string value 1 = " value 1 " ; final configuration conf = new configuration ( ) ; conf set ( property , value 1 ) ; final configuration new conf = new configuration ( ) ; final reconfigurable base reconfigurable = make reconfigurable ( conf , new conf , arrays as list ( property ) ) ; / / kick off a reconfiguration task and wait until it completes reconfigurable start reconfiguration task ( ) ; generic test utils wait for ( new supplier < boolean > ( ) { @ override public boolean get ( ) { return reconfigurable get reconfiguration task status ( ) stopped ( ) ; } } , 100 , 60000 ) ; assert null ( reconfigurable get conf ( ) get ( property ) ) ; }


use a runnable wrapper that simulates a task with unknown failures

public void test exception throwing task ( ) throws exception { thread context context = new thread context ( settings empty ) ; e w m a tracking es thread pool executor executor = new e w m a tracking es thread pool executor ( " test - threadpool " , 1 , 1 , 1000 , time unit milliseconds , concurrent collections new blocking queue ( ) , exceptional wrapper ( ) , es executors daemon thread factory ( " queuetest " ) , new es abort policy ( ) , context ) ; executor prestart all core threads ( ) ; logger info ( " - - > executor : { } " , executor ) ; assert that ( ( long ) executor get task execution e w m a ( ) , equal to ( 0l ) ) ; execute task ( executor , 1 ) ; executor shutdown ( ) ; executor await termination ( 10 , time unit seconds ) ; }


performs a quick search for the given item in the < b > unfiltered < b > data of this model to search only for object that are visible in the gui , use { @ link # get index for row object ( object ) }

protected int get unfiltered index for row object ( row object row object ) { return get index for row object ( row object , get unfiltered data ( ) ) ; }


determine whether the given object is an array : either an object array or a primitive array

public static boolean is array ( @ nullable object obj ) { return ( obj ! = null & & obj get class ( ) is array ( ) ) ; }


returns a { @ link collection } of { @ link system index descriptor } s that describe this plugin ' s system indices , including name , mapping , and settings

default collection < system index descriptor > get system index descriptors ( settings settings ) { return collections empty list ( ) ; }


public boolean record ( e e ) { return offer ( e ) = = buffer full ; }


adds an entry to the zip file if this causes the actual number of entries to exceed 0xffffffff , or if the file requires zip 6 4 features , the file is set to zip 6 4 mode

public void add entry ( zip file entry entry ) { entries put ( entry get name ( ) , entry ) ; set num entries ( num entries + 1 ) ; if ( entry get feature set ( ) contains ( feature zip64 size ) | | entry get feature set ( ) contains ( feature zip64 csize ) | | entry get feature set ( ) contains ( feature zip64 offset ) ) { set zip 6 4 ( true ) ; } }


collect union states from given parallel subtask states

private map < string , list < tuple 2 < stream state handle , operator state handle state meta info > > > collect union states ( list < list < operator state handle > > parallel subtask states ) { map < string , list < tuple 2 < stream state handle , operator state handle state meta info > > > union states = new hash map < > ( parallel subtask states size ( ) ) ; for ( list < operator state handle > sub task state : parallel subtask states ) { for ( operator state handle operator state handle : sub task state ) { if ( operator state handle = = null ) { continue ; } final set < map entry < string , operator state handle state meta info > > partition offset entries = operator state handle get state name to partition offsets ( ) entry set ( ) ; partition offset entries stream ( ) filter ( entry - > entry get value ( ) get distribution mode ( ) equals ( operator state handle mode union ) ) for each ( entry - > { list < tuple 2 < stream state handle , operator state handle state meta info > > state locations = union states compute if absent ( entry get key ( ) , k - > new array list < > ( parallel subtask states size ( ) * partition offset entries size ( ) ) ) ; state locations add ( tuple 2 of ( operator state handle get delegate state handle ( ) , entry get value ( ) ) ) ; } ) ; } } return union states ; }


gets the min address of the encoded data

public address get address ( ) { return addr ; }


public void remove ( int index ) { if ( index > = floats length ) { return ; } floats [ index ] = 0 ; if ( index = = last non zero index ) { last non zero index = find last non zero index ( ) ; } if ( last non zero index < floats length / 4 ) { adjust array ( last non zero index * 2 ) ; } }


return a short name for this exporter used for tracing of remote invocations default is the unqualified class name ( without package ) can be overridden in subclasses

protected string get exporter name ( ) { return class utils get short name ( get class ( ) ) ; }


returns the unsigned short at the given offset , taking into account the endian - ness

default public int get unsigned short ( int offset ) throws memory access exception { return get short ( offset ) & 0xffff ; }


expands the range set to include the given value if the set already includes this number , this will be a no - op

public synchronized void add ( int n ) { for ( int i = 0 ; i < ranges size ( ) ; i + + ) { range r = ranges get ( i ) ; if ( r includes ( n ) ) return ; / / already included if ( r end = = n ) { ranges set ( i , r expand right ( ) ) ; check collapse ( i ) ; return ; } if ( r start = = n + 1 ) { ranges set ( i , r expand left ( ) ) ; check collapse ( i - 1 ) ; return ; } if ( r is bigger than ( n ) ) { / / needs to insert a single - value range ranges add ( i , new range ( n , n + 1 ) ) ; return ; } } ranges add ( new range ( n , n + 1 ) ) ; }


find how many of the containing nodes are " extra " , if any if there are any extras , call choose excess redundancies ( ) to mark them in the excess redundancy map

private void process extra redundancy block ( final block info block , final short replication , final datanode descriptor added node , datanode descriptor del node hint ) { assert namesystem has write lock ( ) ; if ( added node = = del node hint ) { del node hint = null ; } collection < datanode storage info > non excess = new array list < > ( ) ; collection < datanode descriptor > corrupt nodes = corrupt replicas get nodes ( block ) ; for ( datanode storage info storage : blocks map get storages ( block ) ) { if ( storage get state ( ) ! = state normal ) { continue ; } final datanode descriptor cur = storage get datanode descriptor ( ) ; if ( storage are block contents stale ( ) ) { log trace ( " block * process extra redundancy block : postponing { } " + " since storage { } does not yet have up - to - date information " , block , storage ) ; postpone block ( block ) ; return ; } if ( ! is excess ( cur , block ) ) { if ( cur is in service ( ) ) { / / exclude corrupt replicas if ( corrupt nodes = = null | | ! corrupt nodes contains ( cur ) ) { non excess add ( storage ) ; } } } } choose excess redundancies ( non excess , block , replication , added node , del node hint ) ; }


checks whether the specified frame number is outside the range inclusive of both start and end if start < = end , start is within , end is within , and everything in between is within if start > end , start is within , end is within , everything less than start is within and everything greater than end is within this behavior is useful for handling the wrapping case

public static boolean is outside range ( int start frame , int end frame , int frame number ) { if ( start frame = = - 1 | | end frame = = - 1 ) { / / this means nothing should pass return true ; } boolean outside range ; if ( start frame < = end frame ) { outside range = frame number < start frame | | frame number > end frame ; } else { / / wrapping outside range = frame number < start frame & & frame number > end frame ; } return outside range ; }


return whether this { @ link parameter } has a empty

public boolean is empty ( ) { return ( this value = = null ) ; }


gets the script description as an array of lines

public string [ ] get script description ( ) { return script description text get text ( ) split ( " \ \ n " ) ; }


public final field context build field context ( string field ) { mapped field type ft = get field type ( field ) ; if ( ft = = null ) { / / the field is unmapped return null ; } return new field context ( field , build field data ( ft ) , ft ) ; }


virtual address is always a binary offset

public address get markup address ( program program , boolean is binary ) { address space space = program get address factory ( ) get default address space ( ) ; return space get address ( virtual address ) ; }


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


performs an exclusive check - out of the given file

public boolean checkout exclusively ( domain file df ) throws i o exception { assert file in project ( df ) ; try { return df checkout ( true , task monitor dummy ) ; } catch ( cancelled exception e ) { / / cannot happen as long as we use the dummy } return false ; }


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


strategy method used to obtain the { @ link conversion service } by default this method expects a bean named { @ code ' web socket conversion service ' } in the { @ link # get application context ( ) active application context }

protected conversion service get conversion service ( ) { application context application context = get application context ( ) ; assert state ( application context ! = null , " unable to locate the spring application context " ) ; try { return application context get bean ( conversion service bean name , conversion service class ) ; } catch ( beans exception ex ) { throw new illegal state exception ( " unable to find conversion service : please configure a ' " + conversion service bean name + " ' or override the get conversion service ( ) method " , ex ) ; } }


public string get status ( ) { return datum get job status ( ) to string ( ) ; }


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

t visit single statement ( sql base parser single statement context ctx ) ;


returns a newly inserted { @ code loading value reference } , or null if the live value reference is already loading

loading value reference < k , v > insert loading value reference ( final k key , final int hash , boolean check time ) { reference entry < k , v > e = null ; lock ( ) ; try { long now = map ticker read ( ) ; pre write cleanup ( now ) ; atomic reference array < reference entry < k , v > > table = this table ; int index = hash & ( table length ( ) - 1 ) ; reference entry < k , v > first = table get ( index ) ; / / look for an existing entry for ( e = first ; e ! = null ; e = e get next ( ) ) { k entry key = e get key ( ) ; if ( e get hash ( ) = = hash & & entry key ! = null & & map key equivalence equivalent ( key , entry key ) ) { / / we found an existing entry value reference < k , v > value reference = e get value reference ( ) ; if ( value reference is loading ( ) | | ( check time & & ( now - e get write time ( ) < map refresh nanos ) ) ) { / / refresh is a no - op if loading is pending / / if check time , we want to check * after * acquiring the lock if refresh still needs / / to be scheduled return null ; } / / continue returning old value while loading + + mod count ; loading value reference < k , v > loading value reference = new loading value reference < > ( value reference ) ; e set value reference ( loading value reference ) ; return loading value reference ; } } + + mod count ; loading value reference < k , v > loading value reference = new loading value reference < > ( ) ; e = new entry ( key , hash , first ) ; e set value reference ( loading value reference ) ; table set ( index , e ) ; return loading value reference ; } finally { unlock ( ) ; post write cleanup ( ) ; } }


whether the type can be adapted to a reactive streams { @ link publisher }

public boolean is reactive type ( class < ? > type ) { return ( this adapter registry get adapter ( type ) ! = null ) ; }


public file to file ( ) { if ( ! ( fs instanceof local file system ) ) { throw new illegal argument exception ( " not a local path : " + path ) ; } return ( ( local file system ) fs ) path to file ( path ) ; }


required : a list of server specifications < code > repeated istio networking v 1alpha 3 server servers = 1 ; < code >

public com alibaba nacos istio model server builder add servers builder ( ) { return get servers field builder ( ) add builder ( com alibaba nacos istio model server get default instance ( ) ) ; }


get pet { pet id } : find pet by id returns a single pet

response entity < pet > get pet by id ( @ api param ( value = " id of pet to return " , required = true ) @ path variable ( " pet id " ) long pet id ) ;


returns true iff all the listeners o ked the restart

public static boolean is all ready ( ) throws i o exception , interrupted exception { for ( restart listener listener : all ( ) ) { if ( ! listener is ready to restart ( ) ) return false ; } return true ; }


public void close ( ) throws s q l exception { closed = true ; }


returns the size of this entry ( the size of the bubble )

public float get size ( ) { return m size ; }


public void put ( @ non null final string key , final serializable value , final int save time ) { m cache memory utils put ( key , value , save time ) ; m cache disk utils put ( key , value , save time ) ; }


talks to the http interface to get the json output of a status command on the given file

private void get cmd ( string filename , string message , string command , boolean expect o k ) throws exception { string user = hadoop users conf test helper get hadoop users ( ) [ 0 ] ; string out msg = message + " ( " + command + " ) " ; / / remove leading / from filename if ( filename char at ( 0 ) = = ' / ' ) { filename = filename substring ( 1 ) ; } string path ops = message format format ( " / webhdfs / v 1 / { 0 } ? user name = { 1 } & op = { 2 } " , filename , user , command ) ; url url = new url ( test jetty helper get jetty u r l ( ) , path ops ) ; http u r l connection conn = ( http u r l connection ) url open connection ( ) ; conn set request method ( " get " ) ; conn connect ( ) ; int resp = conn get response code ( ) ; if ( expect o k ) { assert assert equals ( out msg , http u r l connection http ok , resp ) ; } else { assert assert equals ( out msg , http u r l connection http forbidden , resp ) ; } }


exit a parse tree produced by { @ link sql base parser # query no with }

void exit query no with ( sql base parser query no with context ctx ) ;


the stream this state is associated with

public http 2 stream stream ( ) { return stream ; }


sets a version used for serialising a response compatible with a previous version

public x content builder with compatible major version ( byte compatible major version ) { assert this compatible major version = = 0 : " compatible version has already been set " ; if ( compatible major version = = 0 ) { throw new illegal argument exception ( " compatible major version must not be equal to 0 " ) ; } this compatible major version = compatible major version ; return this ; }


sets the column preferred widths if you give less widths then there are columns , then the widths will be applied in order , with the remaining columns going untouched note : this method needs to be called after building your columns so , call this after making any calls to { @ link # add column ( abstract dynamic table column ) } < b > warning ! < b > if you set the widths to a size that is smaller than the total display , then the table model will apply the extra space equally across your columns , resulting in sizes that you did not set so , the best way to use this method is to set the actual preferred size for your small columns and then set a very large size ( 400 or so ) for your columns that can be any size

public void set column preferred widths ( int widths ) { int column count = table get column count ( ) ; int n = math min ( widths length , column count ) ; table column model model = table get column model ( ) ; for ( int i = 0 ; i < n ; i + + ) { table column column = model get column ( i ) ; int width = widths [ i ] ; if ( width = = 75 ) { / / horrible code : we have special knowledge that a value of 75 is the default / / column size , which we use in table column model state to signal that we can / / override the size so , if the user sets that value , then change it to / / override our algorithm width = 76 ; } column set width ( width ) ; column set preferred width ( widths [ i ] ) ; } }


removes all values associated with a given key the returned collection is immutable because a { @ code sorted set multimap } has unique sorted values for a given key , this method returns a { @ link sorted set } , instead of the { @ link collection } specified in the { @ link multimap } interface

public sorted set < v > remove all ( @ nullable decl object key ) { return ( sorted set < v > ) super remove all ( key ) ; }


the type of the backing class , method parameter , field , or property described by this type descriptor returns primitive types as - is see { @ link # get object type ( ) } for a variation of this operation that resolves primitive types to their corresponding object types if necessary

public class < ? > get type ( ) { return this type ; }


creates list of users with given input array

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


returns an instance that is identical to this one , except that all incompatible register numbers are renumbered sequentially from the given base , with the first number duplicated if indicated if a null bit set is given , it indicates all registers are incompatible

public register spec list with expanded registers ( int base , boolean duplicate first , bit set compat regs ) { int sz = size ( ) ; if ( sz = = 0 ) { / / don ' t bother making a new zero - element instance return this ; } expander expander = new expander ( this , compat regs , base , duplicate first ) ; for ( int reg idx = 0 ; reg idx < sz ; reg idx + + ) { expander expand register ( reg idx ) ; } return expander get result ( ) ; }


a sensible definition of { @ link # remove } in terms of { @ link # iterator } , using the iterator ' s { @ code remove } method if you override { @ link # iterator } , you may wish to override { @ link # remove } to forward to this implementation

protected boolean standard remove ( @ nullable decl object object ) { iterator < e > iterator = iterator ( ) ; while ( iterator has next ( ) ) { if ( objects equal ( iterator next ( ) , object ) ) { iterator remove ( ) ; return true ; } } return false ; }


manipulate the " live " list of currently configured filters

public web http handler builder filters ( consumer < list < web filter > > consumer ) { consumer accept ( this filters ) ; update filters ( ) ; return this ; }


sets the bitmap height as a fraction of the viewport size

public builder set bitmap height ( float bitmap height ) { this bitmap height = bitmap height ; return this ; }


set the prefix that an expression string starts with the default is " # { "

public void set expression prefix ( string expression prefix ) { assert has text ( expression prefix , " expression prefix must not be empty " ) ; this expression prefix = expression prefix ; }


if a file - based recovery occurs , a recovery target calls this method to reset the recovery stage

public void reset recovery stage ( ) { assert routing entry ( ) recovery source ( ) get type ( ) = = recovery source type peer : " not a peer recovery [ " + routing entry ( ) + " ] " ; assert current engine reference get ( ) = = null ; if ( state ! = index shard state recovering ) { throw new index shard not recovering exception ( shard id , state ) ; } recovery state ( ) set stage ( recovery state stage init ) ; }


protected void start cluster ( int num name nodes , int num datanodes , boolean setup hosts file , long [ ] nodes capacity , boolean check data node host config ) throws i o exception { start cluster ( num name nodes , num datanodes , setup hosts file , nodes capacity , check data node host config , true ) ; }


returns the { @ link artifact } s of compilation tools

public nested set < artifact > get tools ( ) { return tools ; }


extract the ( mandatory ) cause of an exception

private < e extends throwable > e verify cause class ( throwable ex , class < e > clazz ) throws assertion error { throwable cause = ex get cause ( ) ; if ( cause = = null ) { throw new assertion error ( " no cause " , ex ) ; } if ( ! cause get class ( ) equals ( clazz ) ) { throw new assertion error ( " wrong cause class " , cause ) ; } return ( e ) cause ; }


register all files recursively to be deleted on exit

public static void fully delete on exit ( final file file ) { file delete on exit ( ) ; if ( file is directory ( ) ) { file [ ] files = file list files ( ) ; if ( files ! = null ) { for ( file child : files ) { fully delete on exit ( child ) ; } } } }


get the actual instance of ` triangle ` if the actual instanct is not ` triangle ` , the class cast exception will be thrown

public triangle get triangle ( ) throws class cast exception { return ( triangle ) super get actual instance ( ) ; }


public abstract void execute ( map < string , list < string > > parameters , print writer output ) throws exception ;


flush out all write operations scheduled via { @ link # write ( object , channel promise ) }


submit a request to readahead on the given file descriptor

public readahead request submit readahead ( string identifier , file descriptor fd , long off , long len ) { readahead request impl req = new readahead request impl ( identifier , fd , off , len ) ; pool execute ( req ) ; if ( log is trace enabled ( ) ) { log trace ( " submit readahead : " + req ) ; } return req ; }


sets a threshold that enforces a pre - filter roundtrip to pre - filter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold this filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie if date filters are mandatory to match but the shard bounds and the query are disjoint when unspecified , the pre - filter phase is executed if any of these conditions is met : the request targets more than 128 shards the request targets one or more read - only index the primary sort of the query targets an indexed field

public search request builder set pre filter shard size ( int pre filter shard size ) { this request set pre filter shard size ( pre filter shard size ) ; return this ; }


returns a value mask which is sized based upon the register

public big integer get value mask ( ) { big integer value mask = new big integer ( 1 , get base value mask ( ) ) ; return value mask shift right ( start bit ) ; }


returns a copy of the given list that is safe to iterate over and perform actions that may modify the original list see # 303 , # 375 , # 322 , # 2262

public static < t > list < t > get snapshot ( @ non null collection < t > other ) { / / to array creates a new array list internally and does not guarantee that the values it contains / / are non - null collections add all in array list uses to array internally and therefore also / / doesn ' t guarantee that entries are non - null weak hash map ' s iterator does avoid returning null / / and is therefore safe to use see # 322 , # 2262 list < t > result = new array list < > ( other size ( ) ) ; for ( t item : other ) { if ( item ! = null ) { result add ( item ) ; } } return result ; }


returns the { @ code char } value of a header with the specified name if there is more than one value for the specified name , the first value in insertion order is returned


converts a json schema into flink ' s type information throws an exception if the schema cannot converted because of loss of precision or too flexible schema the converter can resolve simple schema references to solve those cases where entities are defined at the beginning and then used throughout a document

public static < t > type information < t > convert ( string json schema ) { preconditions check not null ( json schema , " json schema " ) ; final object mapper mapper = new object mapper ( ) ; mapper get factory ( ) enable ( json parser feature allow comments ) enable ( json parser feature allow unquoted field names ) enable ( json parser feature allow single quotes ) ; final json node node ; try { node = mapper read tree ( json schema ) ; } catch ( i o exception e ) { throw new illegal argument exception ( " invalid json schema " , e ) ; } return ( type information < t > ) convert type ( " < root > " , node , node ) ; }


checks whether the line pointed to by a pair of indexes : { @ code from } ( inclusive ) and { @ code to } ( exclusive ) is blank a line is considered blank if it only consists of space characters ( ' ' )

private static boolean is blank ( bytes reference bytes ref , int from , int to ) { for ( int i = from ; i < to ; + + i ) { if ( bytes ref get ( i ) ! = ( ( byte ) ' ' ) ) { return false ; } } return true ; }


merge in the statistics of a single input stream into the filesystem - wide metrics counters this does not update the fs i o statistics values

private void promote input stream counters to metrics ( ) { / / iterate through all the counters local i o statistics ( ) counters ( ) key set ( ) stream ( ) for each ( e - > promote i o counter ( e ) ) ; }


get the { @ link deletion service } for this deletion task

public deletion service get deletion service ( ) { return deletion service ; }


{ @ code handle cached authentication } is called when a { @ link user } is retrieved from the cache the first { @ code user } parameter is the user object that was found in the cache the default implementation returns a { @ link authentication result # success ( user ) success result } with the provided user , but sub - classes can return a different { @ code user } object , or an unsuccessful result

protected void handle cached authentication ( user user , action listener < authentication result > listener ) { listener on response ( authentication result success ( user ) ) ; }


adds the given item to the cache with the given key and returns any previous entry for the given key that may have already been in the cache if the size of the item is larger than the total cache size , the item will not be added to the cache and instead { @ link # on item evicted ( object , object ) } will be called synchronously with the given key and item the size of the item is determined by the { @ link # get size ( object ) } method to avoid errors where { @ link # get size ( object ) } returns different values for the same object when called at different times , the size value is acquired in { @ code put } and retained until the item is evicted , replaced or removed if { @ code item } is null the behavior here is a little odd for the most part it ' s similar to simply calling { @ link # remove ( object ) } with the given key the difference is that calling this method with a null { @ code item } will result in an entry remaining in the cache with a null value and 0 size the only real consequence is that at some point { @ link # on item evicted ( object , object ) } may be called with the given { @ code key } and a null value ideally we ' d make calling this method with a null { @ code item } identical to { @ link # remove ( object ) } but we ' re preserving this odd behavior to match older versions : (

public synchronized y put ( @ non null t key , @ nullable y item ) { final int item size = get size ( item ) ; if ( item size > = max size ) { on item evicted ( key , item ) ; return null ; } if ( item ! = null ) { current size + = item size ; } @ nullable entry < y > old = cache put ( key , item = = null ? null : new entry < > ( item , item size ) ) ; if ( old ! = null ) { current size - = old size ; if ( ! old value equals ( item ) ) { on item evicted ( key , old value ) ; } } evict ( ) ; return old ! = null ? old value : null ; }


public byte next ( ) throws memory access exception { if ( count = = 0 ) { address range range = addr set iterator ( ) next ( ) ; address start = range get min address ( ) ; long size = range get length ( ) ; if ( size > buf size ) { range = new address range impl ( start , start add ( buf size - 1 ) ) ; size = buf size ; } count = ( int ) size ; pos = 0 ; addr set delete ( range ) ; mem get bytes ( start , buf , 0 , count ) ; } count - - ; return buf [ pos + + ] ; }


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

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


public int size ( ) { return providers size ( ) ; }


note the same entry instance is returned each time this method is called

public entry next ( ) { if ( ! has next ) throw new no such element exception ( ) ; if ( ! valid ) throw new gdx runtime exception ( " # iterator ( ) cannot be used nested " ) ; int [ ] key table = map key table ; if ( next index = = index zero ) { entry key = 0 ; entry value = map zero value ; } else { entry key = key table [ next index ] ; entry value = map value table [ next index ] ; } current index = next index ; find next index ( ) ; return entry ; }


returns mapped value of the specified input


resolve the given destination name to a destination , convert the payload object to serialized form , possibly using a { @ link org springframework messaging converter message converter } , wrap it as a message with the given headers and send it to the resolved destination

< t > void convert and send ( string destination name , t payload , @ nullable map < string , object > headers ) throws messaging exception ;


for the list of job ids find all that match existing jobs ids the repsonse is all the job ids in { @ code ids } that match an existing job id

public void job id matches ( list < string > ids , action listener < list < string > > listener ) { bool query builder bool query builder = new bool query builder ( ) ; bool query builder filter ( new term query builder ( job job type get preferred name ( ) , job anomaly detector job type ) ) ; bool query builder filter ( new terms query builder ( job id get preferred name ( ) , ids ) ) ; search source builder source builder = new search source builder ( ) query ( bool query builder ) ; source builder fetch source ( false ) ; source builder doc value field ( job id get preferred name ( ) , null ) ; search request search request = client prepare search ( ml config index index name ( ) ) set indices options ( indices options lenient expand open ( ) ) set source ( source builder ) set size ( ids size ( ) ) request ( ) ; execute async with origin ( client thread pool ( ) get thread context ( ) , ml origin , search request , action listener < search response > wrap ( response - > { search hit [ ] hits = response get hits ( ) get hits ( ) ; list < string > matched ids = new array list < > ( ) ; for ( search hit hit : hits ) { matched ids add ( hit field ( job id get preferred name ( ) ) get value ( ) ) ; } listener on response ( matched ids ) ; } , listener : : on failure ) , client : : search ) ; }


test a { @ link decoder # decode to mono decode } scenario where the input stream contains an error this test method will feed the first element of the { @ code input } stream to the decoder , followed by an { @ link input exception } the result is expected to contain the error

protected void test decode to mono error ( publisher < data buffer > input , resolvable type output type , @ nullable mime type mime type , @ nullable map < string , object > hints ) { input = mono from ( input ) concat with ( flux error ( new input exception ( ) ) ) ; mono < ? > result = this decoder decode to mono ( input , output type , mime type , hints ) ; step verifier create ( result ) expect error ( input exception class ) verify ( ) ; }


remove the cached session bean instance , if necessary

public void destroy ( ) { if ( this cache session bean ) { synchronized ( this bean instance monitor ) { if ( this bean instance instanceof e j b object ) { remove session bean instance ( ( e j b object ) this bean instance ) ; } } } }


public static string generate token ( string server ) throws i o exception , interrupted exception { user group information current user = user group information get current user ( ) ; log debug ( " the user credential is { } " , current user ) ; string challenge = current user do as ( new privileged exception action < string > ( ) { @ override public string run ( ) throws exception { try { / / this oid for kerberos gss - api mechanism oid mech oid = kerberos util get oid instance ( " gss krb5 mech oid " ) ; g s s manager manager = g s s manager get instance ( ) ; / / gss name for server g s s name server name = manager create name ( " http @ " + server , g s s name nt hostbased service ) ; / / create a g s s context for authentication with the service / / we ' re passing client credentials as null since we want them to / / be read from the subject g s s context gss context = manager create context ( server name canonicalize ( mech oid ) , mech oid , null , g s s context default lifetime ) ; gss context request mutual auth ( true ) ; gss context request cred deleg ( true ) ; / / establish context byte [ ] in token = new byte [ 0 ] ; byte [ ] out token = gss context init sec context ( in token , 0 , in token length ) ; gss context dispose ( ) ; / / base 6 4 encoded and stringified token for server log debug ( " got valid challenge for host { } " , server name ) ; return new string ( base 64 codec encode ( out token ) , standard charsets us ascii ) ; } catch ( g s s exception | illegal access exception | no such field exception | class not found exception e ) { log error ( " error : { } " , e ) ; throw new authentication exception ( e ) ; } } } ) ; return challenge ; }


returns a description of the task that was run

public string get description ( ) { return description ; }


read an ecma array from an amf encoded buffer

private static hash map < string , object > read amf ecma array ( parsable byte array data ) { int count = data read unsigned int to int ( ) ; hash map < string , object > array = new hash map < > ( count ) ; for ( int i = 0 ; i < count ; i + + ) { string key = read amf string ( data ) ; int type = read amf type ( data ) ; object value = read amf data ( data , type ) ; if ( value ! = null ) { array put ( key , value ) ; } } return array ; }


asserts that the expected completion time has passed ( and not " too much " time beyond that )

void assert completion expected ( ) { assert at least time passed ( stopwatch , expected completion wait millis ) ; assert time not passed ( stopwatch , expected completion wait millis + long delay ms ) ; }


return whether the encoding should be forced on responses

public boolean is force response encoding ( ) { return this force response encoding ; }


public tree map < string , object > get values ( ) { int dw index , result ; char [ ] lp value name ; byte [ ] lp data ; int by reference lpcch value name , lp type , lpcb data ; string name ; tree map < string , object > values = new tree map < > ( string case insensitive order ) ; lp value name = new char [ 16384 ] ; lpcch value name = new int by reference ( 16384 ) ; lp type = new int by reference ( ) ; lp data = new byte [ 1 ] ; lpcb data = new int by reference ( ) ; lpcb data set value ( 0 ) ; dw index = 0 ; outer : while ( true ) { result = advapi 3 2 instance reg enum value ( handle , dw index , lp value name , lpcch value name , null , lp type , lp data , lpcb data ) ; switch ( result ) { case winerror error no more items : return values ; case winerror error more data : lp data = new byte [ lpcb data get value ( ) ] ; lpcch value name = new int by reference ( 16384 ) ; continue outer ; case winerror error success : name = new string ( lp value name , 0 , lpcch value name get value ( ) ) ; switch ( lp type get value ( ) ) { case winnt reg sz : values put ( name , convert buffer to string ( lp data ) ) ; break ; case winnt reg dword : values put ( name , convert buffer to int ( lp data ) ) ; break ; default : break ; / / not supported yet } break ; default : check ( result ) ; } dw index + + ; lpcb data set value ( 0 ) ; } }


resolve placeholders within the given string , deferring to the value of { @ link # set ignore unresolvable nested placeholders } to determine whether any unresolvable placeholders should raise an exception or be ignored invoked from { @ link # get property } and its variants , implicitly resolving nested placeholders in contrast , { @ link # resolve placeholders } and { @ link # resolve required placeholders } do not delegate to this method but rather perform their own handling of unresolvable placeholders , as specified by each of those methods

protected string resolve nested placeholders ( string value ) { if ( value is empty ( ) ) { return value ; } return ( this ignore unresolvable nested placeholders ? resolve placeholders ( value ) : resolve required placeholders ( value ) ) ; }


test to verify that mover can ' t move pinned blocks

public void test mover with pinned blocks ( ) throws exception { final configuration conf = new hdfs configuration ( ) ; init conf ( conf ) ; / / sets bigger retry max attempts value so that test case will timed out if / / block pinning errors are not handled properly during block movement conf set int ( d f s config keys dfs mover retry max attempts key , 10000 ) ; final mini d f s cluster cluster = new mini d f s cluster builder ( conf ) num data nodes ( 3 ) build ( ) ; try { cluster wait active ( ) ; final distributed file system dfs = cluster get file system ( ) ; final string file = " / test mover with pinned blocks / file " ; path dir = new path ( " / test mover with pinned blocks " ) ; dfs mkdirs ( dir ) ; / / write to disk dfs set storage policy ( dir , " hot " ) ; final f s data output stream out = dfs create ( new path ( file ) ) ; byte [ ] file data = striped file test util generate bytes ( default block size * 3 ) ; out write ( file data ) ; out close ( ) ; / / verify before movement located block lb = dfs get client ( ) get located blocks ( file , 0 ) get ( 0 ) ; storage type [ ] storage types = lb get storage types ( ) ; for ( storage type storage type : storage types ) { assert assert true ( storage type disk = = storage type ) ; } / / adding one ssd based data node to the cluster storage type [ ] [ ] newtypes = new storage type [ ] [ ] { { storage type ssd } } ; start additional d ns ( conf , 1 , newtypes , cluster ) ; / / mock fs dataset spi # get pinning to show that the block is pinned for ( int i = 0 ; i < cluster get data nodes ( ) size ( ) ; i + + ) { data node dn = cluster get data nodes ( ) get ( i ) ; log info ( " simulate block pinning in datanode { } " , dn ) ; internal data node test utils mock datanode blk pinning ( dn , true ) ; } / / move file blocks to one ssd policy dfs set storage policy ( dir , " one ssd " ) ; int rc = tool runner run ( conf , new mover cli ( ) , new string [ ] { " - p " , dir to string ( ) } ) ; int exitcode = exit status no move block get exit code ( ) ; assert assert equals ( " movement should fail " , exitcode , rc ) ; } finally { cluster shutdown ( ) ; } }


sets the expected behaviour for tasks in case that they encounter an error when checkpointing if this is set as true , which is equivalent to set tolerable checkpoint failure number as zero , job manager would fail the whole job once it received a decline checkpoint message if this is set as false , which is equivalent to set tolerable checkpoint failure number as the maximum of integer ( means unlimited ) , job manager would not fail the whole job no matter how many declined checkpoints it received { @ link # set tolerable checkpoint failure number ( int ) } would always overrule this deprecated method if they have conflicts

public void set fail on checkpointing errors ( boolean fail on checkpointing errors ) { if ( tolerable checkpoint failure number ! = undefined tolerable checkpoint number ) { log warn ( " since tolerable checkpoint failure number has been configured as { } , deprecated # set fail on checkpointing errors ( boolean ) " + " method would not take any effect and please use # set tolerable checkpoint failure number ( int ) method to " + " determine your expected behaviour when checkpoint errors on task side " , tolerable checkpoint failure number ) ; return ; } this fail on checkpointing errors = fail on checkpointing errors ; if ( fail on checkpointing errors ) { this tolerable checkpoint failure number = 0 ; } else { this tolerable checkpoint failure number = unlimited tolerable failure number ; } }


calculate the distance between the given two strings according to the levenshtein algorithm

private static int calculate string distance ( string s 1 , string s 2 ) { if ( s 1 is empty ( ) ) { return s 2 length ( ) ; } if ( s 2 is empty ( ) ) { return s 1 length ( ) ; } int [ ] [ ] d = new int [ s 1 length ( ) + 1 ] [ s 2 length ( ) + 1 ] ; for ( int i = 0 ; i < = s 1 length ( ) ; i + + ) { d [ i ] [ 0 ] = i ; } for ( int j = 0 ; j < = s 2 length ( ) ; j + + ) { d [ 0 ] [ j ] = j ; } for ( int i = 1 ; i < = s 1 length ( ) ; i + + ) { char c 1 = s 1 char at ( i - 1 ) ; for ( int j = 1 ; j < = s 2 length ( ) ; j + + ) { int cost ; char c 2 = s 2 char at ( j - 1 ) ; if ( c 1 = = c 2 ) { cost = 0 ; } else { cost = 1 ; } d [ i ] [ j ] = math min ( math min ( d [ i - 1 ] [ j ] + 1 , d [ i ] [ j - 1 ] + 1 ) , d [ i - 1 ] [ j - 1 ] + cost ) ; } } return d [ s 1 length ( ) ] [ s 2 length ( ) ] ; }


default collection < single logout url > determine logout url ( final registered service registered service , final web application service single logout service , final optional < http servlet request > http request ) { return new array list < > ( 0 ) ; }


registers a { @ link user defined function } instance as a temporary catalog function compared to { @ link # create temporary function ( string , class ) } , this method takes a function instance that might have been parameterized before ( e g through its constructor ) this might be useful for more interactive sessions make sure that the instance is { @ link serializable } compared to { @ link # create temporary system function ( string , user defined function ) } with a globally defined name , catalog functions are always ( implicitly or explicitly ) identified by a catalog and database temporary functions can shadow permanent ones if a permanent function under a given name exists , it will be inaccessible in the current session to make the permanent function available again one can drop the corresponding temporary function

void create temporary function ( string path , user defined function function instance ) ;


called when the relevant data changes executed on a serial executor , so don ' t do any long - running tasks !


sets the { @ link options data } used by this parser , based on the given { @ code options classes }

public final builder options classes ( class < ? extends options base > options classes ) { return this options data ( ( opaque options data ) get options data internal ( immutable list copy of ( options classes ) ) ) ; }


skips whitespace , \ + nl pairs , and block - style comments assumes line comments are handled outside does not handle digraphs , trigraphs or decahexagraphs

protected static int skip whitespace ( byte [ ] chars , int pos , int end ) { while ( pos < end ) { if ( character is whitespace ( chars [ pos ] & 0xff ) ) { pos + + ; } else if ( chars [ pos ] = = ' \ \ ' & & pos + 1 < end & & chars [ pos + 1 ] = = ' \ n ' ) { pos + + ; } else if ( chars [ pos ] = = ' / ' & & pos + 1 < end & & chars [ pos + 1 ] = = ' * ' ) { pos + = 2 ; while ( pos < end - 1 ) { if ( chars [ pos + + ] = = ' * ' ) { if ( chars [ pos ] = = ' / ' ) { pos + + ; break ; / / proper comment end } } } } else { / / not whitespace return pos ; } } return pos ; / / pos = = len , meaning we fell off the end }


rewrite sort rewrite logic : change the collations field to reference the new input

public frame decorrelate rel ( sort rel ) { / / sort itself should not reference cor vars assert ! cm map ref rel to cor ref contains key ( rel ) ; / / sort only references field positions in collations field / / the collations field in the new rel now need to refer to the / / new output positions in its input / / its output does not change the input ordering , so there ' s no / / need to call propagate expr final rel node old input = rel get input ( ) ; final frame frame = get invoke ( old input ) ; if ( frame = = null ) { / / if input has not been rewritten , do not rewrite this rel return null ; } final rel node new input = frame r ; mappings target mapping mapping = mappings target ( frame old to new outputs , old input get row type ( ) get field count ( ) , new input get row type ( ) get field count ( ) ) ; rel collation old collation = rel get collation ( ) ; rel collation new collation = rex util apply ( mapping , old collation ) ; final sort new sort = logical sort create ( new input , new collation , rel offset , rel fetch ) ; / / sort does not change input ordering return new frame ( rel , new sort , frame c , frame old to new outputs ) ; }


initializes the reduce - part of the job with the appropriate output settings

public static void set output ( job conf job , string table name , int field count ) { d b configuration db conf = set output ( job , table name ) ; db conf set output field count ( field count ) ; }


remove the given high symbol from this container the key is removed from the main symbol map it is also removed from the mapped entry map and from the list of parameter symbols if applicable

private void remove symbol ( high symbol high symbol ) { symbol entry map entry = high symbol get first whole map ( ) ; if ( map entry instanceof mapped entry ) { mapped var key key = new mapped var key ( map entry get storage ( ) , map entry get p c adress ( ) ) ; addr mapped symbols remove ( key ) ; } symbol map remove ( high symbol get id ( ) ) ; if ( high symbol is parameter ( ) ) { int index = high symbol get category index ( ) ; high symbol [ ] new array = new high symbol [ param symbols length - 1 ] ; for ( int i = 0 ; i < index ; + + i ) { new array [ i ] = param symbols [ i ] ; } for ( int i = index + 1 ; i < param symbols length ; + + i ) { high symbol param sym = param symbols [ i ] ; new array [ i - 1 ] = param sym ; param sym category index - = 1 ; } } }


processes the output generated by an auxiliary include - scanning binary stored in a file

public static list < inclusion > process includes ( path file ) throws i o exception { try { byte [ ] data = file system utils read content ( file ) ; return include parser process includes ( arrays as list ( new string ( data , iso 8859 1 ) split ( " \ n " ) ) ) ; } catch ( i o exception e ) { throw new i o exception ( " error reading include file " + file + " : " + e get message ( ) ) ; } }


returns the number of times { @ link cache } lookup methods have returned either a cached or uncached value this is defined as { @ code hit count + miss count } < b > note : < b > the values of the metrics are undefined in case of overflow ( though it is guaranteed not to throw an exception ) if you require specific handling , we recommend implementing your own stats collector

public long request count ( ) { return saturated add ( hit count , miss count ) ; }


{ @ link # remove listener ( string , string , configuration listener ) }

default void remove listener ( string key , configuration listener listener ) { remove listener ( key , get default group ( ) , listener ) ; }


returns the addresses that are in program 2 , but not in program 1 the returned address set is derived using program 2

public address set get addresses only in two ( ) { return new address set ( only in two ) ; }


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


return a { @ link resolvable type } for the specified { @ link method parameter } at a specific nesting level , overriding the target type to resolve with a specific given type

static resolvable type for method parameter ( method parameter method parameter , @ nullable type target type , int nesting level ) { resolvable type owner = for type ( method parameter get containing class ( ) ) as ( method parameter get declaring class ( ) ) ; return for type ( target type , new method parameter type provider ( method parameter ) , owner as variable resolver ( ) ) get nested ( nesting level , method parameter type indexes per level ) ; }


this method will throw an { @ link unsupported operation exception }

public string read line ( ) { throw new unsupported operation exception ( " read line is not supported " ) ; }


returns a function that computes the toolchains that should be registered for a repository function

public function < ? super rule , ? extends list < string > > get toolchains to register function ( ) { return toolchains to register function ; }


public void cmdb get instance list 1 ( ) throws exception { string service name = random domain name ( ) ; system out println ( service name ) ; naming service create ( service name , constants default namespace id , constants default group ) ; instance register ( service name , constants default namespace id , constants default group , " 11 11 11 11 " , string value of ( test port 4 dom 1 ) , " c 1 " ) ; instance register ( service name , constants default namespace id , constants default group , " 22 22 22 22 " , string value of ( test port 4 dom 1 ) , " c 1 " ) ; instance register ( service name , constants default namespace id , constants default group , " 33 33 33 33 " , string value of ( test port 4 dom 1 ) , " c 2 " ) ; instance register ( service name , constants default namespace id , constants default group , " 44 44 44 44 " , string value of ( test port 4 dom 1 ) , " c 2 " ) ; instance register ( service name , constants default namespace id , constants default group , " 55 55 55 55 " , string value of ( test port 4 dom 1 ) , " c 1 " ) ; instance register ( service name , constants default namespace id , constants default group , " 66 66 66 66 " , string value of ( test port 4 dom 1 ) , " c 1 " ) ; string service name 2 = random domain name ( ) ; naming service create ( service name 2 , constants default namespace id , constants default group ) ; instance register ( service name 2 , constants default namespace id , constants default group , " 77 77 77 77 " , string value of ( test port 4 dom 1 ) , " c 2 " ) ; instance register ( service name 2 , constants default namespace id , constants default group , " 88 88 88 88 " , string value of ( test port 4 dom 1 ) , " c 2 " ) ; time unit seconds sleep ( 5l ) ; object node json = jackson utils create empty json node ( ) ; json put ( " type " , " label " ) ; json put ( " expression " , " consumer label label 1 = provider label label 1 " ) ; response entity < string > http result = request ( " / nacos / v 1 / ns / service " , params new params ( ) append param ( " service name " , service name ) append param ( " protect threshold " , " 0 " ) append param ( " selector " , json to string ( ) ) done ( ) , string class , http method put ) ; assert assert equals ( http u r l connection http ok , http result get status code value ( ) ) ; http result = request ( " / nacos / v 1 / ns / instance / list " , params new params ( ) append param ( " service name " , service name ) append param ( " client i p " , " 11 11 11 11 " ) done ( ) , string class , http method get ) ; assert assert equals ( http u r l connection http ok , http result get status code value ( ) ) ; json node result = jackson utils to obj ( http result get body ( ) ) ; assert assert equals ( 1 , result get ( " hosts " ) size ( ) ) ; }


coordinate a graceful failover this proceeds in several phases : 1 ) pre - flight checks : ensure that the local node is healthy , and thus a candidate for failover 2a ) determine the current active node if it is the local node , no need to failover - return success 2b ) get the other nodes 3a ) ask the other nodes to yield from election for a number of seconds 3b ) ask the active node to yield from the election for a number of seconds 4 ) allow the normal election path to run in other threads wait until we either become unhealthy or we see an election attempt recorded by the normal code path 5 ) allow the old active to rejoin the election , so a future failback is possible

private void do graceful failover ( ) throws service failed exception , i o exception , interrupted exception { int timeout = failover controller get graceful fence timeout ( conf ) * 2 ; / / phase 1 : pre - flight checks check eligible for failover ( ) ; / / phase 2 : determine old / current active node check that we ' re not / / ourselves active , etc h a service target old active = get current active ( ) ; if ( old active = = null ) { / / no node is currently active so , if we aren ' t already / / active ourselves by means of a normal election , then there ' s / / probably something preventing us from becoming active throw new service failed exception ( " no other node is currently active " ) ; } if ( old active get address ( ) equals ( local target get address ( ) ) ) { log info ( " local node " + local target + " is already active " + " no need to failover returning success " ) ; return ; } / / phase 2b : get the other nodes list < h a service target > other nodes = get all other nodes ( ) ; list < z k f c protocol > other zkfcs = new array list < z k f c protocol > ( other nodes size ( ) ) ; / / phase 3 : ask the other nodes to yield from the election long st = system nano time ( ) ; h a service target active node = null ; for ( h a service target remote : other nodes ) { / / same location , same node - may not always be = = equality if ( remote get address ( ) equals ( old active get address ( ) ) ) { active node = remote ; continue ; } other zkfcs add ( cede remote active ( remote , timeout ) ) ; } assert active node ! = null : " active node does not match any known remote node " ; / / phase 3b : ask the old active to yield other zkfcs add ( cede remote active ( active node , timeout ) ) ; / / phase 4 : wait for the normal election to make the local node / / active active attempt record attempt = wait for active attempt ( timeout + 60000 , st ) ; if ( attempt = = null ) { / / we didn ' t even make an attempt to become active synchronized ( this ) { if ( last health state ! = state service healthy ) { throw new service failed exception ( " unable to become active " + " service became unhealthy while trying to failover " ) ; } } throw new service failed exception ( " unable to become active " + " local node did not get an opportunity to do so from zoo keeper , " + " or the local node took too long to transition to active " ) ; } / / phase 5 at this point , we made some attempt to become active so we / / can tell the old active to rejoin if it wants this allows a quick / / fail - back if we immediately crash for ( z k f c protocol zkfc : other zkfcs ) { zkfc cede active ( - 1 ) ; } if ( attempt succeeded ) { log info ( " successfully became active " + attempt status ) ; } else { / / propagate failure string msg = " failed to become active " + attempt status ; throw new service failed exception ( msg ) ; } }


model tests for get actual instance recursively

public void test get actual instance recursively ( ) throws exception { mammal m = new mammal ( ) ; pig p = new pig ( ) ; danish pig dp = new danish pig ( ) ; dp set class name ( " danish pig " ) ; p set actual instance ( dp ) ; m set actual instance ( p ) ; assert assert true ( m get actual instance recursively ( ) instanceof danish pig ) ; pig p 2 = new pig ( ) ; m set actual instance ( p 2 ) ; assert assert equals ( m get actual instance recursively ( ) , null ) ; }


at one time , this may have been a set of flags however , microsoft changed its meaning and never bothered to update winnt h this field is really an offset ( an rva ) to an array of pointers each of these pointers points to an image import by name structure

public int get original first thunk ( ) { return original first thunk ; }


returns the width of the scrolled viewport

public float get scroll width ( ) { return widget area width ; }


sorts the array , treating its elements as unsigned 64 - bit integers

public static void sort ( long [ ] array ) { check not null ( array ) ; sort ( array , 0 , array length ) ; }


< code > required uint 3 2 second = 8 ; < code >

public int get second ( ) { return second ; }


validates zoom , x , and y values , and returns the total number of allowed tiles along the xy axis

private static int validate z x y ( int zoom , int x tile , int y tile ) { final int tiles = 1 < < check precision range ( zoom ) ; if ( x tile < 0 | | y tile < 0 | | x tile > = tiles | | y tile > = tiles ) { throw new illegal argument exception ( string format ( locale root , " zoom / x / y combination is not valid : % d / % d / % d " , zoom , x tile , y tile ) ) ; } return tiles ; }


public void add ( map < path fragment , artifact > input manifest , conflict checker checker ) { for ( map entry < path fragment , artifact > entry : input manifest entry set ( ) ) { checker put ( manifest , check for workspace ( entry get key ( ) ) , entry get value ( ) ) ; } }


public void set id ( long id ) { this id = id ; }


returns the result of dividing { @ code p } by { @ code q } , rounding using the specified { @ code rounding mode }

public static long divide ( long p , long q , rounding mode mode ) { check not null ( mode ) ; long div = p / q ; / / throws if q = = 0 long rem = p - q * div ; / / equals p % q if ( rem = = 0 ) { return div ; } / * * normal java division rounds towards 0 , consistently with rounding mode down we just have to * deal with the cases where rounding towards 0 is wrong , which typically depends on the sign of * p / q * * signum is 1 if p and q are both nonnegative or both negative , and - 1 otherwise * / int signum = 1 | ( int ) ( ( p ^ q ) > > ( long size - 1 ) ) ; boolean increment ; switch ( mode ) { case unnecessary : check rounding unnecessary ( rem = = 0 ) ; / / fall through case down : increment = false ; break ; case up : increment = true ; break ; case ceiling : increment = signum > 0 ; break ; case floor : increment = signum < 0 ; break ; case half even : case half down : case half up : long abs rem = abs ( rem ) ; long cmp rem to half divisor = abs rem - ( abs ( q ) - abs rem ) ; / / subtracting two nonnegative longs can ' t overflow / / cmp rem to half divisor has the same sign as compare ( abs ( rem ) , abs ( q ) / 2 ) if ( cmp rem to half divisor = = 0 ) { / / exactly on the half mark increment = ( mode = = half up | ( mode = = half even & ( div & 1 ) ! = 0 ) ) ; } else { increment = cmp rem to half divisor > 0 ; / / closer to the up value } break ; default : throw new assertion error ( ) ; } return increment ? div + signum : div ; }


public void start ( ) throws throwable { if ( ! started compare and set ( false , true ) ) { return ; } boss = new nio event loop group ( 1 , new default thread factory ( " qos - boss " , true ) ) ; worker = new nio event loop group ( 0 , new default thread factory ( " qos - worker " , true ) ) ; server bootstrap server bootstrap = new server bootstrap ( ) ; server bootstrap group ( boss , worker ) ; server bootstrap channel ( nio server socket channel class ) ; server bootstrap option ( channel option so reuseaddr , true ) ; server bootstrap child option ( channel option tcp nodelay , true ) ; server bootstrap child handler ( new channel initializer < channel > ( ) { @ override protected void init channel ( channel ch ) throws exception { ch pipeline ( ) add last ( new qos process handler ( welcome , accept foreign ip ) ) ; } } ) ; try { if ( string utils is blank ( host ) ) { server bootstrap bind ( port ) sync ( ) ; } else { server bootstrap bind ( host , port ) sync ( ) ; } logger info ( " qos - server bind localhost : " + port ) ; } catch ( throwable throwable ) { logger error ( " qos - server can not bind localhost : " + port , throwable ) ; throw throwable ; } }


creates list of users with given input array

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


async http delete url request params are expanded using the given query { @ link query } , { @ code response type } can be an rest result or rest result data { @ code t } type { @ code callback } result callback execution , if you need response headers , you can convert the received rest result to http rest result

public < t > void delete ( string url , header header , query query , type response type , callback < t > callback ) { execute ( url , http method delete , new request http entity ( header , query ) , response type , callback ) ; }


time out calls which have been assigned to nodes

private int timeout calls to send ( timeout processor processor ) { int num timed out = 0 ; for ( list < call > call list : calls to send values ( ) ) { num timed out + = processor handle timeouts ( call list , " timed out waiting to send the call " ) ; } if ( num timed out > 0 ) log debug ( " timed out { } call ( s ) with assigned nodes " , num timed out ) ; return num timed out ; }


returns true if restore process completed ( either successfully or with failure )

public boolean completed ( ) { return this = = success | | this = = failure ; }


public boolean is bool item ( ) { return bool item ; }


called by subclasses whenever a data frame is received from the transport

protected void transport data received ( readable buffer frame , boolean end of stream ) { if ( transport error ! = null ) { / / we ' ve already detected a transport error and now we ' re just accumulating more detail / / for it transport error = transport error augment description ( " data - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ n " + readable buffers read as string ( frame , error charset ) ) ; frame close ( ) ; if ( transport error get description ( ) length ( ) > 1000 | | end of stream ) { http 2 processing failed ( transport error , false , transport error metadata ) ; } } else { if ( ! headers received ) { http 2 processing failed ( status internal with description ( " headers not received before payload " ) , false , new metadata ( ) ) ; return ; } int frame size = frame readable bytes ( ) ; inbound data received ( frame ) ; if ( end of stream ) { / / this is a protocol violation as we expect to receive trailers if ( frame size > 0 ) { transport error = status internal with description ( " received unexpected eos on non - empty data frame from server " ) ; } else { transport error = status internal with description ( " received unexpected eos on empty data frame from server " ) ; } transport error metadata = new metadata ( ) ; transport report status ( transport error , false , transport error metadata ) ; } } }


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


creates a { @ link application class loader } if { @ link m r job config # mapreduce job classloader } is set to true , and the app classpath environment variable is set

public static class loader create job class loader ( configuration conf ) throws i o exception { class loader job class loader = null ; if ( conf get boolean ( m r job config mapreduce job classloader , false ) ) { string app classpath = system getenv ( environment app classpath key ( ) ) ; if ( app classpath = = null ) { log warn ( " not creating job classloader since app classpath is not set " ) ; } else { log info ( " creating job classloader " ) ; if ( log is debug enabled ( ) ) { log debug ( " app classpath = " + app classpath ) ; } string [ ] system classes = get system classes ( conf ) ; job class loader = create job class loader ( app classpath , system classes ) ; } } return job class loader ; }


updates this range set by the intersection of this range and the given range

public synchronized boolean retain all ( range set that ) { list < range > intersection = new array list < > ( ) ; int lhs = 0 , rhs = 0 ; while ( lhs < this ranges size ( ) & & rhs < that ranges size ( ) ) { range lr = this ranges get ( lhs ) ; range rr = that ranges get ( rhs ) ; if ( lr end < = rr start ) { / / lr has no overlap with that ranges lhs + + ; continue ; } if ( rr end < = lr start ) { / / rr has no overlap with this ranges rhs + + ; continue ; } / / overlap figure out the intersection range v = lr intersect ( rr ) ; intersection add ( v ) ; / / move on to the next pair if ( lr end < rr end ) { lhs + + ; } else { rhs + + ; } } boolean same = this ranges equals ( intersection ) ; if ( ! same ) { this ranges clear ( ) ; this ranges add all ( intersection ) ; return true ; } else { return false ; } }


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


public void set dynamic attribute ( string uri , string local name , object value ) throws jsp exception { if ( this dynamic attributes = = null ) { this dynamic attributes = new hash map < > ( ) ; } if ( ! is valid dynamic attribute ( local name , value ) ) { throw new illegal argument exception ( " attribute " + local name + " = \ " " + value + " \ " is not allowed " ) ; } this dynamic attributes put ( local name , value ) ; }


enter a parse tree produced by { @ link eql base parser # sequence term }

void enter sequence term ( eql base parser sequence term context ctx ) ;


test method refresh nodes this method is present and it works

public void test refresh nodes ( ) throws exception { resource manager get client r m service ( ) ; refresh nodes request request = refresh nodes request new instance ( decommission type normal ) ; refresh nodes response response = client refresh nodes ( request ) ; assert not null ( response ) ; }


the interface used by clients to obtain a new { @ link application id } for submitting new applications the < code > resource manager < code > responds with a new , monotonically increasing , { @ link application id } which is used by the client to submit a new application the < code > resource manager < code > also responds with details such as maximum resource capabilities in the cluster as specified in { @ link get new application response }

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


find instances of state store that are accepted by { @ link queryable store type # accepts } and have the provided store name

< t > list < t > stores ( string store name , queryable store type < t > queryable store type ) ;


reads a single character from this reader and returns it as an integer with the two higher - order bytes set to 0 returns - 1 if the end of the reader has been reached

public int read ( ) throws i o exception { synchronized ( lock ) { char char array [ ] = new char [ 1 ] ; if ( read ( char array , 0 , 1 ) ! = - 1 ) { return char array [ 0 ] ; } return - 1 ; } }


public table debug cell ( ) { super set debug ( true ) ; if ( debug ! = debug cell ) { this debug = debug cell ; invalidate ( ) ; } return this ; }


public long weight ( ) { return weight ; }


public string get small snake ( ) { return small snake ; }


sets the < code > anytype 2 < code > property

public additional properties class anytype 2 ( object anytype 2 ) { this anytype 2 = anytype 2 ; return this ; }


stores a byte value at the given index any value currently at that index will be replaced by the new value

public void put byte ( long index , byte value ) { property page page = get or create page ( get page i d ( index ) ) ; int n = page get size ( ) ; page add byte ( get page offset ( index ) , value ) ; num properties + = page get size ( ) - n ; }


many get port operations return - 1 by default leniently coerse to null

@ test public void new builder with port negative coerces to null ( ) { assert that ( endpoint new builder ( ) port ( - 1 ) build ( ) port ( ) ) is null ( ) ; }


returns an { @ link iterable } which traverses all operators in forward or reverse topological order

public iterable < stream operator wrapper < ? , ? > > get all operators ( boolean reverse ) { return reverse ? new stream operator wrapper read iterator ( tail operator wrapper , true ) : new stream operator wrapper read iterator ( main operator wrapper , false ) ; }


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


return the handshake http headers those are the request headers for a server session and the response headers for a client session

public http headers get headers ( ) { return this headers ; }


static factory to retrieve a type 4 ( pseudo randomly generated ) uuid

public static uuid random uuid ( ) { java util uuid uuid = java util uuid random u u i d ( ) ; while ( uuid equals ( sentinel id internal ) | | uuid equals ( zero id internal ) ) { uuid = java util uuid random u u i d ( ) ; } return new uuid ( uuid get most significant bits ( ) , uuid get least significant bits ( ) ) ; }


returns the mean time spent per foreground playback from the start of a seek until playback is ready again , in milliseconds , or { @ link c # time unset } if no playback has been in foreground

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


pushes block of instructions to be executed in this partial evaluator

private void push instruction block ( traced variables variables , traced stack stack , int start offset ) { instruction block stack push ( new my instruction block ( variables , stack , start offset ) ) ; }


sets the color of this decal , expanding the alpha from 0 - 254 to 0 - 255

public void set packed color ( float color ) { color abgr 8 8 8 8 to color ( this color , color ) ; vertices [ c1 ] = color ; vertices [ c2 ] = color ; vertices [ c3 ] = color ; vertices [ c4 ] = color ; }


the number of edges incident with v for unweighted graphs valence and degree are the same , except valence is an int while degree is a double

public int valence ( vertex v ) { return ( in valence ( v ) + out valence ( v ) - num loops ( v ) ) ; }


public void set network timeout ( executor executor , int milliseconds ) throws s q l exception { delegate set network timeout ( executor , milliseconds ) ; network timeout = milliseconds ; dirty bits | = dirty bit nettimeout ; }


returns the path of the log file for this worker

public path get log file ( ) { return log file ; }


look up a parameter type ids from a method index cheaper than : { @ code read type list ( proto ids get ( method ids ( ) get ( method dex index ) get proto index ( ) ) get parameters offset ( ) ) get types ( ) ; }

public short [ ] parameter type indices from method index ( int method index ) { check bounds ( method index , table of contents method ids size ) ; int position = table of contents method ids off + ( size of member id item * method index ) ; position + = size of ushort ; / / declaring class index int proto index = data get short ( position ) & 0x f f f f ; check bounds ( proto index , table of contents proto ids size ) ; position = table of contents proto ids off + ( size of proto id item * proto index ) ; position + = size of uint ; / / shorty index position + = size of uint ; / / return type index int parameters offset = data get int ( position ) ; if ( parameters offset = = 0 ) { return empty short array ; } position = parameters offset ; int size = data get int ( position ) ; if ( size < = 0 ) { throw new assertion error ( " unexpected parameter type list size : " + size ) ; } position + = size of uint ; short [ ] types = new short [ size ] ; for ( int i = 0 ; i < size ; i + + ) { types [ i ] = data get short ( position ) ; position + = size of ushort ; } return types ; }


sets the configuration properties from the specified { @ link map }

boolean set options ( map < channel option < ? > , ? > options ) ;


convert a byte array into a hexadecimal string

public static string convert bytes to string ( byte [ ] bytes ) { return convert bytes to string ( bytes , null ) ; }


convert durations to the given time unit

public builder convert durations to ( time unit duration unit ) { this duration unit = duration unit ; return this ; }


creates a random string whose length is the number of characters specified characters will be chosen from the set of latin alphabetic characters ( a - z , a - z ) and the digits 0 - 9

public static string random alphanumeric ( final int count ) { return random ( count , true , true ) ; }


this testcase tests re - replication , when data nodes [ 0 ] and data nodes [ 1 ] are already chosen so the 1st replica should be placed on a different rack of rack 1 the rest replicas can be placed randomly ,

public void test rereplicate 2 ( ) throws exception { update heartbeat with usage ( ) ; list < datanode storage info > chosen nodes = new array list < > ( ) ; chosen nodes add ( storages [ 0 ] ) ; chosen nodes add ( storages [ 1 ] ) ; datanode storage info [ ] targets ; targets = choose target ( 0 , chosen nodes ) ; assert equals ( targets length , 0 ) ; targets = choose target ( 1 , chosen nodes ) ; assert equals ( targets length , 1 ) ; assert false ( is on same rack ( data nodes [ 0 ] , targets [ 0 ] ) ) ; targets = choose target ( 2 , chosen nodes ) ; assert equals ( targets length , 2 ) ; assert false ( is on same rack ( data nodes [ 0 ] , targets [ 0 ] ) & & is on same rack ( data nodes [ 0 ] , targets [ 1 ] ) ) ; }


gets the total number of missing blocks on the cluster with replication factor 1

public long get number of missing blocks with replication factor one ( ) { return this number of missing blocks with replication factor one ; }


< code > optional second msg blah = 2 ; < code >

public builder set blah ( org springframework protobuf second msg builder builder for value ) { if ( blah builder = = null ) { blah = builder for value build ( ) ; on changed ( ) ; } else { blah builder set message ( builder for value build ( ) ) ; } bit field 0 | = 0x 0 0 0 0 0 0 0 2 ; return this ; }


public float get float item ( ) { return float item ; }


method that the service will run periodically

protected abstract void periodic invoke ( ) ;


returns an existing configured target value , or { @ code null } if there is not an appropriate configured target value key in the graph this helper is provided so legacy tests don ' t need to know about details of skyframe keys

public static configured target value get existing configured target value ( skyframe executor skyframe executor , label label , build configuration config ) throws interrupted exception { sky key key = configured target key builder ( ) set label ( label ) set configuration ( config ) build ( ) ; return ( configured target value ) get existing value ( skyframe executor , key ) ; }


set the names of the beans that should automatically get wrapped with proxies a name can specify a prefix to match by ending with " " , e g " my bean , tx " will match the bean named " my bean " and all beans whose name start with " tx " < b > note : < b > in case of a factory bean , only the objects created by the factory bean will get proxied this default behavior applies as of spring 2 0 if you intend to proxy a factory bean instance itself ( a rare use case , but spring 1 2 ' s default behavior ) , specify the bean name of the factory bean including the factory - bean prefix " & " : e g " & my factory bean "

public void set bean names ( string bean names ) { assert not empty ( bean names , " ' bean names ' must not be empty " ) ; this bean names = new array list < > ( bean names length ) ; for ( string mapped name : bean names ) { this bean names add ( string utils trim whitespace ( mapped name ) ) ; } }


sets the signing lineage file used to sign the apk

public apk actions builder set signing lineage file ( artifact signing lineage ) { this signing lineage = signing lineage ; return this ; }


if the value is a compound value , this is set < code > optional aapt pb compound value compound value = 5 ; < code >


iterate over all primary keys sorted based upon the associated index key the iterator is initially positioned before the first index buffer whose index key is greater than or equal to the specified start field value

public d b field iterator index key iterator before ( int column index , field start field ) throws i o exception { synchronized ( db ) { index table index table = secondary indexes get ( column index ) ; if ( index table = = null ) { throw new i o exception ( " index required ( " + get name ( ) + " , " + column index + " ) " ) ; } return index table key iterator before ( start field ) ; } }


returns { @ code buffer } or a copy of it , such that there is enough space in the returned buffer to store { @ code new frame count } additional frames

private short [ ] ensure space for additional frames ( short [ ] buffer , int frame count , int additional frame count ) { int current capacity frames = buffer length / channel count ; if ( frame count + additional frame count < = current capacity frames ) { return buffer ; } else { int new capacity frames = 3 * current capacity frames / 2 + additional frame count ; return arrays copy of ( buffer , new capacity frames * channel count ) ; } }


when this property is configured only messages to destinations matching one of the configured prefixes are eligible for handling when there is a match the prefix is removed and only the remaining part of the destination is used for method - mapping purposes by default , no prefixes are configured in which case all messages are eligible for handling

public void set destination prefixes ( @ nullable collection < string > prefixes ) { this destination prefixes clear ( ) ; if ( prefixes ! = null ) { for ( string prefix : prefixes ) { prefix = prefix trim ( ) ; this destination prefixes add ( prefix ) ; } } }


public completable future < job details info > get job details ( job i d job id ) { final job details headers details headers = job details headers get instance ( ) ; final job message parameters params = new job message parameters ( ) ; params job path parameter resolve ( job id ) ; return send request ( details headers , params ) ; }


visits the default value of this annotation interface method

public annotation visitor visit annotation default ( ) { if ( mv ! = null ) { return mv visit annotation default ( ) ; } return null ; }