Examples of incValue()


Examples of org.apache.hadoop.hbase.util.ManualEnvironmentEdge.incValue()

    LOG.info("second get - connection has been marked idle in the middle");
    // To check that the connection actually became idle would need to read some private
    //  fields of RpcClient.
    table.get(new Get(ROW));
    mee.incValue(idleTime + 1000);

    LOG.info("third get - connection is idle, but the reader doesn't know yet");
    // We're testing here a special case:
    //  time limit reached BUT connection not yet reclaimed AND a new call.
    //  in this situation, we don't close the connection, instead we use it immediately.
View Full Code Here

Examples of org.apache.hadoop.hbase.util.ManualEnvironmentEdge.incValue()

    EnvironmentEdgeManager.injectEdge(mee);
    LOG.info("first get");
    table.get(new Get(ROW));

    LOG.info("first get - changing the time & sleeping");
    mee.incValue(idleTime + 1000);
    Thread.sleep(1500); // we need to wait a little for the connection to be seen as idle.
                        // 1500 = sleep time in RpcClient#waitForWork + a margin

    LOG.info("second get - connection has been marked idle in the middle");
    // To check that the connection actually became idle would need to read some private
View Full Code Here

Examples of org.apache.hadoop.hbase.util.ManualEnvironmentEdge.incValue()

    LOG.info("second get - connection has been marked idle in the middle");
    // To check that the connection actually became idle would need to read some private
    //  fields of RpcClient.
    table.get(new Get(ROW));
    mee.incValue(idleTime + 1000);

    LOG.info("third get - connection is idle, but the reader doesn't know yet");
    // We're testing here a special case:
    //  time limit reached BUT connection not yet reclaimed AND a new call.
    //  in this situation, we don't close the connection, instead we use it immediately.
View Full Code Here

Examples of org.apache.hadoop.hbase.util.ManualEnvironmentEdge.incValue()

    fs.addToFailedServers(ia);
    Assert.assertTrue( fs.isFailedServer(ia) );
    Assert.assertTrue( fs.isFailedServer(ia2) );

    ee.incValue( 1 );
    Assert.assertTrue( fs.isFailedServer(ia) );
    Assert.assertTrue( fs.isFailedServer(ia2) );

    ee.incValue( RpcClient.FAILED_SERVER_EXPIRY_DEFAULT + 1 );
    Assert.assertFalse( fs.isFailedServer(ia) );
View Full Code Here

Examples of org.apache.hadoop.hbase.util.ManualEnvironmentEdge.incValue()

    ee.incValue( 1 );
    Assert.assertTrue( fs.isFailedServer(ia) );
    Assert.assertTrue( fs.isFailedServer(ia2) );

    ee.incValue( RpcClient.FAILED_SERVER_EXPIRY_DEFAULT + 1 );
    Assert.assertFalse( fs.isFailedServer(ia) );
    Assert.assertFalse( fs.isFailedServer(ia2) );

    fs.addToFailedServers(ia);
    fs.addToFailedServers(ia3);
View Full Code Here

Examples of org.apache.hadoop.hbase.util.ManualEnvironmentEdge.incValue()

    Assert.assertTrue( fs.isFailedServer(ia) );
    Assert.assertTrue( fs.isFailedServer(ia2) );
    Assert.assertTrue( fs.isFailedServer(ia3) );
    Assert.assertTrue( fs.isFailedServer(ia4) );

    ee.incValue( RpcClient.FAILED_SERVER_EXPIRY_DEFAULT + 1 );
    Assert.assertFalse( fs.isFailedServer(ia) );
    Assert.assertFalse( fs.isFailedServer(ia2) );
    Assert.assertFalse( fs.isFailedServer(ia3) );
    Assert.assertFalse( fs.isFailedServer(ia4) );
View Full Code Here

Examples of org.apache.hadoop.hbase.util.ManualEnvironmentEdge.incValue()

    DeadServer d = new DeadServer();


    d.add(hostname123);
    mee.incValue(1);
    d.add(hostname1234);
    mee.incValue(1);
    d.add(hostname12345);

    List<Pair<ServerName, Long>> copy = d.copyDeadServersSince(2L);
View Full Code Here

Examples of org.apache.hadoop.hbase.util.ManualEnvironmentEdge.incValue()


    d.add(hostname123);
    mee.incValue(1);
    d.add(hostname1234);
    mee.incValue(1);
    d.add(hostname12345);

    List<Pair<ServerName, Long>> copy = d.copyDeadServersSince(2L);
    Assert.assertEquals(2, copy.size());
View Full Code Here

Examples of org.apache.hadoop.hbase.util.ManualEnvironmentEdge.incValue()

    fs.addToFailedServers(ia);
    Assert.assertTrue( fs.isFailedServer(ia) );
    Assert.assertTrue( fs.isFailedServer(ia2) );

    ee.incValue( 1 );
    Assert.assertTrue( fs.isFailedServer(ia) );
    Assert.assertTrue( fs.isFailedServer(ia2) );

    ee.incValue( RpcClient.FAILED_SERVER_EXPIRY_DEFAULT + 1 );
    Assert.assertFalse( fs.isFailedServer(ia) );
View Full Code Here

Examples of org.apache.hadoop.hbase.util.ManualEnvironmentEdge.incValue()

    ee.incValue( 1 );
    Assert.assertTrue( fs.isFailedServer(ia) );
    Assert.assertTrue( fs.isFailedServer(ia2) );

    ee.incValue( RpcClient.FAILED_SERVER_EXPIRY_DEFAULT + 1 );
    Assert.assertFalse( fs.isFailedServer(ia) );
    Assert.assertFalse( fs.isFailedServer(ia2) );

    fs.addToFailedServers(ia);
    fs.addToFailedServers(ia3);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.