use of org.apache.cassandra.auth.AllowAllNetworkAuthorizer in project cassandra by apache.
the class CQLConnectionTest method setup.
@Before
public void setup() {
DatabaseDescriptor.toolInitialization();
DatabaseDescriptor.setAuthenticator(new AllowAllAuthenticator());
DatabaseDescriptor.setAuthorizer(new AllowAllAuthorizer());
DatabaseDescriptor.setNetworkAuthorizer(new AllowAllNetworkAuthorizer());
long seed = new SecureRandom().nextLong();
logger.info("seed: {}", seed);
random = new Random(seed);
address = InetAddress.getLoopbackAddress();
try {
try (ServerSocket serverSocket = new ServerSocket(0)) {
port = serverSocket.getLocalPort();
}
Thread.sleep(250);
} catch (Exception e) {
throw new RuntimeException(e);
}
alloc = GlobalBufferPoolAllocator.instance;
// set connection-local queue size to 0 so that all capacity is allocated from reserves
DatabaseDescriptor.setNativeTransportReceiveQueueCapacityInBytes(0);
// set transport to max frame size possible
DatabaseDescriptor.setNativeTransportMaxFrameSize(256 * (int) ONE_MIB);
}
use of org.apache.cassandra.auth.AllowAllNetworkAuthorizer in project cassandra by apache.
the class SimpleClientPerfTest method setup.
@Before
public void setup() {
DatabaseDescriptor.toolInitialization();
DatabaseDescriptor.setAuthenticator(new AllowAllAuthenticator());
DatabaseDescriptor.setAuthorizer(new AllowAllAuthorizer());
DatabaseDescriptor.setNetworkAuthorizer(new AllowAllNetworkAuthorizer());
address = InetAddress.getLoopbackAddress();
try {
try (ServerSocket serverSocket = new ServerSocket(0)) {
port = serverSocket.getLocalPort();
}
Thread.sleep(250);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
use of org.apache.cassandra.auth.AllowAllNetworkAuthorizer in project cassandra by apache.
the class SimpleClientBurnTest method setup.
@Before
public void setup() {
DatabaseDescriptor.toolInitialization();
DatabaseDescriptor.setAuthenticator(new AllowAllAuthenticator());
DatabaseDescriptor.setAuthorizer(new AllowAllAuthorizer());
DatabaseDescriptor.setNetworkAuthorizer(new AllowAllNetworkAuthorizer());
long seed = new SecureRandom().nextLong();
logger.info("seed: {}", seed);
address = InetAddress.getLoopbackAddress();
try {
try (ServerSocket serverSocket = new ServerSocket(0)) {
port = serverSocket.getLocalPort();
}
Thread.sleep(250);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
Aggregations