This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
# Main peregrine configuration file. All values here can be overridden on the | |
# command line by running --param=value. For example to change the default | |
# basedir you can run with --basedir=/d0/peregrine-fs | |
# | |
### | |
### | |
# | |
# The controller which will send and receive RPC messages and handle job |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void test1() throws Exception { | |
List<Long> delayOptions = Longs.asList( 0, 1000 ); | |
List<Boolean> chunkOptions = Booleans.asList( true, false ); | |
for( long delay : delayOptions ) { | |
for ( boolean chunked : chunkOptions ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String desc = String.format( "Iteration %s of %s", step, iterations ); | |
merge( new Job().setDelegate( IterJob.Map.class ) | |
.setInput( graph_by_source , | |
"/pr/out/rank_vector" , | |
"/pr/out/dangling" , | |
"/pr/out/nonlinked" , | |
"broadcast:/pr/out/nr_nodes" ) | |
.setOutput( "shuffle:default", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.netty.buffer; | |
import java.util.ArrayList; | |
import java.util.List; | |
/** | |
* | |
*/ | |
public class Test { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.netty.buffer; | |
import io.netty.util.internal.JavassistTypeParameterMatcherGenerator; | |
import java.nio.ByteBuffer; | |
import java.nio.ByteOrder; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.netty.buffer; | |
import sun.misc.Unsafe; | |
import java.lang.reflect.Field; | |
import java.nio.Buffer; | |
import java.nio.ByteBuffer; | |
/** | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.netty.buffer; | |
import sun.misc.Unsafe; | |
import java.lang.reflect.Field; | |
import java.nio.Buffer; | |
import java.nio.ByteBuffer; | |
/** | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.netty.buffer; | |
import io.netty.util.internal.JavassistTypeParameterMatcherGenerator; | |
import sun.misc.Unsafe; | |
import sun.nio.ch.DirectBuffer; | |
import java.lang.reflect.Field; | |
import java.nio.ByteBuffer; | |
import java.nio.ByteOrder; | |
import java.util.ArrayList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> Gold standard direct byte buffer via Unsafe. (java.nio.DirectByteBuffer) 203 ms | |
> regular direct ByteBuffer after changing order (LITTLE_ENDIAN) (java.nio.DirectByteBuffer) 792 ms | |
> Netty Unpooled directBuffer (io.netty.buffer.UnpooledUnsafeDirectByteBuf) 1,070 ms | |
> regular direct ByteBuffer after changing order (BIG_ENDIAN) (java.nio.DirectByteBuffer) 1,077 ms | |
> Netty Unpooled directBuffer with set ByteOrder (BIG_ENDIAN) (io.netty.buffer.UnpooledUnsafeDirectByteBuf) 1,094 ms | |
> regular direct ByteBuffer (java.nio.DirectByteBuffer) 1,106 ms | |
> regular heap ByteBuffer (java.nio.HeapByteBuffer) 1,693 ms | |
> regular heap ByteBuffer after changing order (BIG_ENDIAN) (java.nio.HeapByteBuffer) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DirectByteBuffer(int cap) { // package-private | |
super(-1, 0, cap, cap, false); | |
Bits.reserveMemory( cap ); | |
int ps = Bits.pageSize(); | |
long base = 0; | |
try { | |
base = unsafe.allocateMemory(cap + ps); | |
} catch (OutOfMemoryError x) { |
OlderNewer