Search in sources :

Example 71 with StringSink

use of io.questdb.std.str.StringSink in project questdb by questdb.

the class IODispatcherTest method testSendHttpGetAndSimpleResponse.

@Test
public void testSendHttpGetAndSimpleResponse() throws Exception {
    LOG.info().$("started testSendHttpGetAndSimpleResponse").$();
    final String request = "GET /status?x=1&a=%26b&c&d=x HTTP/1.1\r\n" + "Host: localhost:9000\r\n" + "Connection: keep-alive\r\n" + "Cache-Control: max-age=0\r\n" + "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\r\n" + "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.48 Safari/537.36\r\n" + "Accept-Encoding: gzip,deflate,sdch\r\n" + "Accept-Language: en-US,en;q=0.8\r\n" + "Cookie: textwrapon=false; textautoformat=false; wysiwyg=textarea\r\n" + "\r\n";
    // the difference between request and expected is url encoding (and ':' padding, which can easily be fixed)
    final String expected = "GET /status?x=1&a=&b&c&d=x HTTP/1.1\r\n" + "host:localhost:9000\r\n" + "connection:keep-alive\r\n" + "cache-control:max-age=0\r\n" + "accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\r\n" + "user-agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.48 Safari/537.36\r\n" + "accept-encoding:gzip,deflate,sdch\r\n" + "accept-language:en-US,en;q=0.8\r\n" + "cookie:textwrapon=false; textautoformat=false; wysiwyg=textarea\r\n" + "\r\n";
    final String expectedResponse = "HTTP/1.1 200 OK\r\n" + "Server: questDB/1.0\r\n" + "Date: Thu, 1 Jan 1970 00:00:00 GMT\r\n" + "Transfer-Encoding: chunked\r\n" + "Content-Type: text/plain; charset=utf-8\r\n" + "\r\n" + "04\r\n" + "OK\r\n" + "\r\n" + "00\r\n" + "\r\n";
    assertMemoryLeak(() -> {
        HttpServerConfiguration httpServerConfiguration = new DefaultHttpServerConfiguration(new DefaultHttpContextConfiguration() {

            @Override
            public MillisecondClock getClock() {
                return () -> 0;
            }
        });
        SOCountDownLatch connectLatch = new SOCountDownLatch(1);
        SOCountDownLatch contextClosedLatch = new SOCountDownLatch(1);
        AtomicInteger closeCount = new AtomicInteger(0);
        try (IODispatcher<HttpConnectionContext> dispatcher = IODispatchers.create(new DefaultIODispatcherConfiguration(), new IOContextFactory<HttpConnectionContext>() {

            @Override
            public HttpConnectionContext newInstance(long fd, IODispatcher<HttpConnectionContext> dispatcher1) {
                connectLatch.countDown();
                return new HttpConnectionContext(httpServerConfiguration.getHttpContextConfiguration(), metrics) {

                    @Override
                    public void close() {
                        // context is closed
                        if (closeCount.incrementAndGet() == 1) {
                            super.close();
                            contextClosedLatch.countDown();
                        }
                    }
                }.of(fd, dispatcher1);
            }
        })) {
            StringSink sink = new StringSink();
            final HttpRequestProcessorSelector selector = new HttpRequestProcessorSelector() {

                @Override
                public HttpRequestProcessor select(CharSequence url) {
                    return null;
                }

                @Override
                public HttpRequestProcessor getDefaultProcessor() {
                    return new HttpRequestProcessor() {

                        @Override
                        public void onHeadersReady(HttpConnectionContext context) {
                            HttpRequestHeader headers = context.getRequestHeader();
                            sink.put(headers.getMethodLine());
                            sink.put("\r\n");
                            ObjList<CharSequence> headerNames = headers.getHeaderNames();
                            for (int i = 0, n = headerNames.size(); i < n; i++) {
                                sink.put(headerNames.getQuick(i)).put(':');
                                sink.put(headers.getHeader(headerNames.getQuick(i)));
                                sink.put("\r\n");
                            }
                            sink.put("\r\n");
                        }

                        @Override
                        public void onRequestComplete(HttpConnectionContext context) throws PeerDisconnectedException, PeerIsSlowToReadException {
                            context.simpleResponse().sendStatusWithDefaultMessage(200);
                        }
                    };
                }

                @Override
                public void close() {
                }
            };
            AtomicBoolean serverRunning = new AtomicBoolean(true);
            SOCountDownLatch serverHaltLatch = new SOCountDownLatch(1);
            new Thread(() -> {
                while (serverRunning.get()) {
                    dispatcher.run(0);
                    dispatcher.processIOQueue((operation, context) -> context.handleClientOperation(operation, selector, EmptyRescheduleContext));
                }
                serverHaltLatch.countDown();
            }).start();
            long fd = Net.socketTcp(true);
            try {
                long sockAddr = Net.sockaddr("127.0.0.1", 9001);
                try {
                    TestUtils.assertConnect(fd, sockAddr);
                    connectLatch.await();
                    int len = request.length();
                    long buffer = TestUtils.toMemory(request);
                    try {
                        Assert.assertEquals(len, Net.send(fd, buffer, len));
                        // read response we expect
                        StringSink sink2 = new StringSink();
                        final int expectedLen = expectedResponse.length();
                        int read = 0;
                        while (read < expectedLen) {
                            int n = Net.recv(fd, buffer, len);
                            Assert.assertTrue(n > 0);
                            for (int i = 0; i < n; i++) {
                                sink2.put((char) Unsafe.getUnsafe().getByte(buffer + i));
                            }
                            // copy response bytes to sink
                            read += n;
                        }
                        TestUtils.assertEquals(expectedResponse, sink2);
                    } finally {
                        Unsafe.free(buffer, len, MemoryTag.NATIVE_DEFAULT);
                    }
                    Assert.assertEquals(0, Net.close(fd));
                    LOG.info().$("closed [fd=").$(fd).$(']').$();
                    fd = -1;
                    contextClosedLatch.await();
                    serverRunning.set(false);
                    serverHaltLatch.await();
                    Assert.assertEquals(0, dispatcher.getConnectionCount());
                    TestUtils.assertEquals(expected, sink);
                } finally {
                    Net.freeSockAddr(sockAddr);
                }
            } finally {
                if (fd != -1) {
                    Net.close(fd);
                }
            }
            Assert.assertEquals(1, closeCount.get());
        }
    });
}
Also used : AbstractCharSequence(io.questdb.std.str.AbstractCharSequence) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) Log(io.questdb.log.Log) io.questdb.mp(io.questdb.mp) NetUtils(io.questdb.cutlass.NetUtils) SqlException(io.questdb.griffin.SqlException) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) TestUtils(io.questdb.test.tools.TestUtils) TestUtils.assertMemoryLeak(io.questdb.test.tools.TestUtils.assertMemoryLeak) SqlCompiler(io.questdb.griffin.SqlCompiler) Timestamps(io.questdb.std.datetime.microtime.Timestamps) TestLatchedCounterFunctionFactory(io.questdb.griffin.engine.functions.test.TestLatchedCounterFunctionFactory) io.questdb.network(io.questdb.network) LogFactory(io.questdb.log.LogFactory) io.questdb.std(io.questdb.std) Metrics(io.questdb.Metrics) CyclicBarrier(java.util.concurrent.CyclicBarrier) SqlExecutionContextImpl(io.questdb.griffin.SqlExecutionContextImpl) io.questdb.cutlass.http.processors(io.questdb.cutlass.http.processors) SharedRandom(io.questdb.griffin.engine.functions.rnd.SharedRandom) TimeUnit(java.util.concurrent.TimeUnit) LockSupport(java.util.concurrent.locks.LockSupport) StringSink(io.questdb.std.str.StringSink) CountDownLatch(java.util.concurrent.CountDownLatch) AtomicLong(java.util.concurrent.atomic.AtomicLong) MillisecondClock(io.questdb.std.datetime.millitime.MillisecondClock) Path(io.questdb.std.str.Path) JitUtil(io.questdb.jit.JitUtil) io.questdb.cairo(io.questdb.cairo) AllowAllCairoSecurityContext(io.questdb.cairo.security.AllowAllCairoSecurityContext) SqlExecutionContext(io.questdb.griffin.SqlExecutionContext) org.junit(org.junit) NotNull(org.jetbrains.annotations.NotNull) ByteSequence(io.questdb.std.str.ByteSequence) TemporaryFolder(org.junit.rules.TemporaryFolder) InputStream(java.io.InputStream) AbstractCharSequence(io.questdb.std.str.AbstractCharSequence) StringSink(io.questdb.std.str.StringSink) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) MillisecondClock(io.questdb.std.datetime.millitime.MillisecondClock)

Example 72 with StringSink

use of io.questdb.std.str.StringSink in project questdb by questdb.

the class IODispatcherTest method testSendHttpGet.

@Test
public void testSendHttpGet() throws Exception {
    LOG.info().$("started testSendHttpGet").$();
    final String request = "GET /status?x=1&a=%26b&c&d=x HTTP/1.1\r\n" + "Host: localhost:9000\r\n" + "Connection: keep-alive\r\n" + "Cache-Control: max-age=0\r\n" + "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\r\n" + "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.48 Safari/537.36\r\n" + "Accept-Encoding: gzip,deflate,sdch\r\n" + "Accept-Language: en-US,en;q=0.8\r\n" + "Cookie: textwrapon=false; textautoformat=false; wysiwyg=textarea\r\n" + "\r\n";
    // the difference between request and expected is url encoding (and ':' padding, which can easily be fixed)
    final String expected = "GET /status?x=1&a=&b&c&d=x HTTP/1.1\r\n" + "host:localhost:9000\r\n" + "connection:keep-alive\r\n" + "cache-control:max-age=0\r\n" + "accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\r\n" + "user-agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.48 Safari/537.36\r\n" + "accept-encoding:gzip,deflate,sdch\r\n" + "accept-language:en-US,en;q=0.8\r\n" + "cookie:textwrapon=false; textautoformat=false; wysiwyg=textarea\r\n" + "\r\n";
    assertMemoryLeak(() -> {
        HttpServerConfiguration httpServerConfiguration = new DefaultHttpServerConfiguration();
        SOCountDownLatch connectLatch = new SOCountDownLatch(1);
        SOCountDownLatch contextClosedLatch = new SOCountDownLatch(1);
        SOCountDownLatch requestReceivedLatch = new SOCountDownLatch(1);
        AtomicInteger closeCount = new AtomicInteger(0);
        try (IODispatcher<HttpConnectionContext> dispatcher = IODispatchers.create(new DefaultIODispatcherConfiguration(), new IOContextFactory<HttpConnectionContext>() {

            @Override
            public HttpConnectionContext newInstance(long fd, IODispatcher<HttpConnectionContext> dispatcher1) {
                connectLatch.countDown();
                return new HttpConnectionContext(httpServerConfiguration.getHttpContextConfiguration(), metrics) {

                    @Override
                    public void close() {
                        // context is closed
                        if (closeCount.incrementAndGet() == 1) {
                            super.close();
                            contextClosedLatch.countDown();
                        }
                    }
                }.of(fd, dispatcher1);
            }
        })) {
            StringSink sink = new StringSink();
            final HttpRequestProcessorSelector selector = new HttpRequestProcessorSelector() {

                @Override
                public HttpRequestProcessor select(CharSequence url) {
                    return new HttpRequestProcessor() {

                        @Override
                        public void onHeadersReady(HttpConnectionContext context) {
                            HttpRequestHeader headers = context.getRequestHeader();
                            sink.put(headers.getMethodLine());
                            sink.put("\r\n");
                            ObjList<CharSequence> headerNames = headers.getHeaderNames();
                            for (int i = 0, n = headerNames.size(); i < n; i++) {
                                sink.put(headerNames.getQuick(i)).put(':');
                                sink.put(headers.getHeader(headerNames.getQuick(i)));
                                sink.put("\r\n");
                            }
                            sink.put("\r\n");
                            requestReceivedLatch.countDown();
                        }
                    };
                }

                @Override
                public HttpRequestProcessor getDefaultProcessor() {
                    return null;
                }

                @Override
                public void close() {
                }
            };
            AtomicBoolean serverRunning = new AtomicBoolean(true);
            SOCountDownLatch serverHaltLatch = new SOCountDownLatch(1);
            new Thread(() -> {
                while (serverRunning.get()) {
                    dispatcher.run(0);
                    dispatcher.processIOQueue((operation, context) -> context.handleClientOperation(operation, selector, EmptyRescheduleContext));
                }
                serverHaltLatch.countDown();
            }).start();
            long fd = Net.socketTcp(true);
            try {
                long sockAddr = Net.sockaddr("127.0.0.1", 9001);
                try {
                    TestUtils.assertConnect(fd, sockAddr);
                    connectLatch.await();
                    int len = request.length();
                    long buffer = TestUtils.toMemory(request);
                    try {
                        Assert.assertEquals(len, Net.send(fd, buffer, len));
                    } finally {
                        Unsafe.free(buffer, len, MemoryTag.NATIVE_DEFAULT);
                    }
                    // do not disconnect right away, wait for server to receive the request
                    requestReceivedLatch.await();
                    Assert.assertEquals(0, Net.close(fd));
                    LOG.info().$("closed [fd=").$(fd).$(']').$();
                    fd = -1;
                    contextClosedLatch.await();
                    serverRunning.set(false);
                    serverHaltLatch.await();
                    Assert.assertEquals(0, dispatcher.getConnectionCount());
                    TestUtils.assertEquals(expected, sink);
                } finally {
                    Net.freeSockAddr(sockAddr);
                }
            } finally {
                if (fd != -1) {
                    Net.close(fd);
                }
            }
            Assert.assertEquals(1, closeCount.get());
        }
    });
}
Also used : AbstractCharSequence(io.questdb.std.str.AbstractCharSequence) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) Log(io.questdb.log.Log) io.questdb.mp(io.questdb.mp) NetUtils(io.questdb.cutlass.NetUtils) SqlException(io.questdb.griffin.SqlException) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) TestUtils(io.questdb.test.tools.TestUtils) TestUtils.assertMemoryLeak(io.questdb.test.tools.TestUtils.assertMemoryLeak) SqlCompiler(io.questdb.griffin.SqlCompiler) Timestamps(io.questdb.std.datetime.microtime.Timestamps) TestLatchedCounterFunctionFactory(io.questdb.griffin.engine.functions.test.TestLatchedCounterFunctionFactory) io.questdb.network(io.questdb.network) LogFactory(io.questdb.log.LogFactory) io.questdb.std(io.questdb.std) Metrics(io.questdb.Metrics) CyclicBarrier(java.util.concurrent.CyclicBarrier) SqlExecutionContextImpl(io.questdb.griffin.SqlExecutionContextImpl) io.questdb.cutlass.http.processors(io.questdb.cutlass.http.processors) SharedRandom(io.questdb.griffin.engine.functions.rnd.SharedRandom) TimeUnit(java.util.concurrent.TimeUnit) LockSupport(java.util.concurrent.locks.LockSupport) StringSink(io.questdb.std.str.StringSink) CountDownLatch(java.util.concurrent.CountDownLatch) AtomicLong(java.util.concurrent.atomic.AtomicLong) MillisecondClock(io.questdb.std.datetime.millitime.MillisecondClock) Path(io.questdb.std.str.Path) JitUtil(io.questdb.jit.JitUtil) io.questdb.cairo(io.questdb.cairo) AllowAllCairoSecurityContext(io.questdb.cairo.security.AllowAllCairoSecurityContext) SqlExecutionContext(io.questdb.griffin.SqlExecutionContext) org.junit(org.junit) NotNull(org.jetbrains.annotations.NotNull) ByteSequence(io.questdb.std.str.ByteSequence) TemporaryFolder(org.junit.rules.TemporaryFolder) InputStream(java.io.InputStream) AbstractCharSequence(io.questdb.std.str.AbstractCharSequence) StringSink(io.questdb.std.str.StringSink) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) AtomicInteger(java.util.concurrent.atomic.AtomicInteger)

Example 73 with StringSink

use of io.questdb.std.str.StringSink in project questdb by questdb.

the class IODispatcherTest method assertMetadataAndData.

private void assertMetadataAndData(String tableName, long expectedCommitLag, int expectedMaxUncommittedRows, int expectedImportedRows, String expectedData) {
    final String baseDir = temp.getRoot().getAbsolutePath();
    DefaultCairoConfiguration configuration = new DefaultCairoConfiguration(baseDir);
    try (TableReader reader = new TableReader(configuration, tableName)) {
        Assert.assertEquals(expectedCommitLag, reader.getCommitLag());
        Assert.assertEquals(expectedMaxUncommittedRows, reader.getMaxUncommittedRows());
        Assert.assertEquals(expectedImportedRows, reader.size());
        Assert.assertEquals(0, expectedImportedRows - reader.size());
        StringSink sink = new StringSink();
        TestUtils.assertCursor(expectedData, reader.getCursor(), reader.getMetadata(), false, sink);
    }
}
Also used : StringSink(io.questdb.std.str.StringSink)

Example 74 with StringSink

use of io.questdb.std.str.StringSink in project questdb by questdb.

the class IODispatcherTest method assertColumn.

private void assertColumn(CharSequence expected, int index) {
    final String baseDir = temp.getRoot().getAbsolutePath();
    DefaultCairoConfiguration configuration = new DefaultCairoConfiguration(baseDir);
    try (TableReader reader = new TableReader(configuration, "telemetry")) {
        final StringSink sink = new StringSink();
        sink.clear();
        printer.printFullColumn(reader.getCursor(), reader.getMetadata(), index, false, sink);
        TestUtils.assertEquals(expected, sink);
        reader.getCursor().toTop();
        sink.clear();
        printer.printFullColumn(reader.getCursor(), reader.getMetadata(), index, false, sink);
        TestUtils.assertEquals(expected, sink);
    }
}
Also used : StringSink(io.questdb.std.str.StringSink)

Example 75 with StringSink

use of io.questdb.std.str.StringSink in project questdb by questdb.

the class IODispatcherTest method testSendTimeout.

@Test
public void testSendTimeout() throws Exception {
    LOG.info().$("started testSendHttpGet").$();
    final String request = "GET /status?x=1&a=%26b&c&d=x HTTP/1.1\r\n" + "Host: localhost:9000\r\n" + "Connection: keep-alive\r\n" + "Cache-Control: max-age=0\r\n" + "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\r\n" + "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.48 Safari/537.36\r\n" + "Accept-Encoding: gzip,deflate,sdch\r\n" + "Accept-Language: en-US,en;q=0.8\r\n" + "Cookie: textwrapon=false; textautoformat=false; wysiwyg=textarea\r\n" + "\r\n";
    assertMemoryLeak(() -> {
        HttpServerConfiguration httpServerConfiguration = new DefaultHttpServerConfiguration();
        SOCountDownLatch connectLatch = new SOCountDownLatch(1);
        SOCountDownLatch contextClosedLatch = new SOCountDownLatch(1);
        AtomicInteger closeCount = new AtomicInteger(0);
        try (IODispatcher<HttpConnectionContext> dispatcher = IODispatchers.create(new DefaultIODispatcherConfiguration() {

            @Override
            public long getTimeout() {
                // 0.5s idle timeout
                return 500;
            }
        }, new IOContextFactory<HttpConnectionContext>() {

            @Override
            public HttpConnectionContext newInstance(long fd, IODispatcher<HttpConnectionContext> dispatcher1) {
                connectLatch.countDown();
                return new HttpConnectionContext(httpServerConfiguration.getHttpContextConfiguration(), metrics) {

                    @Override
                    public void close() {
                        // context is closed
                        if (closeCount.incrementAndGet() == 1) {
                            super.close();
                            contextClosedLatch.countDown();
                        }
                    }
                }.of(fd, dispatcher1);
            }
        })) {
            StringSink sink = new StringSink();
            HttpRequestProcessorSelector selector = new HttpRequestProcessorSelector() {

                @Override
                public HttpRequestProcessor select(CharSequence url) {
                    return null;
                }

                @Override
                public HttpRequestProcessor getDefaultProcessor() {
                    return new HttpRequestProcessor() {

                        @Override
                        public void onHeadersReady(HttpConnectionContext connectionContext) {
                            HttpRequestHeader headers = connectionContext.getRequestHeader();
                            sink.put(headers.getMethodLine());
                            sink.put("\r\n");
                            ObjList<CharSequence> headerNames = headers.getHeaderNames();
                            for (int i = 0, n = headerNames.size(); i < n; i++) {
                                sink.put(headerNames.getQuick(i)).put(':');
                                sink.put(headers.getHeader(headerNames.getQuick(i)));
                                sink.put("\r\n");
                            }
                            sink.put("\r\n");
                        }
                    };
                }

                @Override
                public void close() {
                }
            };
            AtomicBoolean serverRunning = new AtomicBoolean(true);
            SOCountDownLatch serverHaltLatch = new SOCountDownLatch(1);
            new Thread(() -> {
                while (serverRunning.get()) {
                    dispatcher.run(0);
                    dispatcher.processIOQueue((operation, context) -> context.handleClientOperation(operation, selector, EmptyRescheduleContext));
                }
                serverHaltLatch.countDown();
            }).start();
            long fd = Net.socketTcp(true);
            try {
                long sockAddr = Net.sockaddr("127.0.0.1", 9001);
                try {
                    TestUtils.assertConnect(fd, sockAddr);
                    Net.setTcpNoDelay(fd, true);
                    connectLatch.await();
                    int len = request.length();
                    long buffer = TestUtils.toMemory(request);
                    try {
                        int part1 = len / 2;
                        Assert.assertEquals(part1, Net.send(fd, buffer, part1));
                        Os.sleep(1000);
                        Assert.assertEquals(len - part1, Net.send(fd, buffer + part1, len - part1));
                    } finally {
                        Unsafe.free(buffer, len, MemoryTag.NATIVE_DEFAULT);
                    }
                    contextClosedLatch.await();
                    Assert.assertEquals(0, dispatcher.getConnectionCount());
                    serverRunning.set(false);
                    serverHaltLatch.await();
                    Assert.assertEquals(0, dispatcher.getConnectionCount());
                    // do not close client side before server does theirs
                    Assert.assertTrue(Net.isDead(fd));
                    TestUtils.assertEquals("", sink);
                } finally {
                    Net.freeSockAddr(sockAddr);
                }
            } finally {
                Net.close(fd);
                LOG.info().$("closed [fd=").$(fd).$(']').$();
            }
            Assert.assertEquals(1, closeCount.get());
        }
    });
}
Also used : AbstractCharSequence(io.questdb.std.str.AbstractCharSequence) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) Log(io.questdb.log.Log) io.questdb.mp(io.questdb.mp) NetUtils(io.questdb.cutlass.NetUtils) SqlException(io.questdb.griffin.SqlException) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) TestUtils(io.questdb.test.tools.TestUtils) TestUtils.assertMemoryLeak(io.questdb.test.tools.TestUtils.assertMemoryLeak) SqlCompiler(io.questdb.griffin.SqlCompiler) Timestamps(io.questdb.std.datetime.microtime.Timestamps) TestLatchedCounterFunctionFactory(io.questdb.griffin.engine.functions.test.TestLatchedCounterFunctionFactory) io.questdb.network(io.questdb.network) LogFactory(io.questdb.log.LogFactory) io.questdb.std(io.questdb.std) Metrics(io.questdb.Metrics) CyclicBarrier(java.util.concurrent.CyclicBarrier) SqlExecutionContextImpl(io.questdb.griffin.SqlExecutionContextImpl) io.questdb.cutlass.http.processors(io.questdb.cutlass.http.processors) SharedRandom(io.questdb.griffin.engine.functions.rnd.SharedRandom) TimeUnit(java.util.concurrent.TimeUnit) LockSupport(java.util.concurrent.locks.LockSupport) StringSink(io.questdb.std.str.StringSink) CountDownLatch(java.util.concurrent.CountDownLatch) AtomicLong(java.util.concurrent.atomic.AtomicLong) MillisecondClock(io.questdb.std.datetime.millitime.MillisecondClock) Path(io.questdb.std.str.Path) JitUtil(io.questdb.jit.JitUtil) io.questdb.cairo(io.questdb.cairo) AllowAllCairoSecurityContext(io.questdb.cairo.security.AllowAllCairoSecurityContext) SqlExecutionContext(io.questdb.griffin.SqlExecutionContext) org.junit(org.junit) NotNull(org.jetbrains.annotations.NotNull) ByteSequence(io.questdb.std.str.ByteSequence) TemporaryFolder(org.junit.rules.TemporaryFolder) InputStream(java.io.InputStream) AbstractCharSequence(io.questdb.std.str.AbstractCharSequence) StringSink(io.questdb.std.str.StringSink) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) AtomicInteger(java.util.concurrent.atomic.AtomicInteger)

Aggregations

StringSink (io.questdb.std.str.StringSink)284 Test (org.junit.Test)167 Function (io.questdb.cairo.sql.Function)38 BaseConnection (org.postgresql.core.BaseConnection)36 UnaryFunction (io.questdb.griffin.engine.functions.UnaryFunction)28 StrConstant (io.questdb.griffin.engine.functions.constants.StrConstant)22 StrFunction (io.questdb.griffin.engine.functions.StrFunction)20 AbstractGriffinTest (io.questdb.griffin.AbstractGriffinTest)16 Path (io.questdb.std.str.Path)16 CountDownLatch (java.util.concurrent.CountDownLatch)15 CyclicBarrier (java.util.concurrent.CyclicBarrier)15 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)13 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)11 SqlCompiler (io.questdb.griffin.SqlCompiler)10 SqlExecutionContextImpl (io.questdb.griffin.SqlExecutionContextImpl)10 SqlException (io.questdb.griffin.SqlException)9 Metrics (io.questdb.Metrics)8 io.questdb.cairo (io.questdb.cairo)8 AllowAllCairoSecurityContext (io.questdb.cairo.security.AllowAllCairoSecurityContext)8 NetUtils (io.questdb.cutlass.NetUtils)8