Java Code Examples for org.apache.calcite.avatica.metrics.noop.NoopMetricsSystem#getInstance()
The following examples show how to use
org.apache.calcite.avatica.metrics.noop.NoopMetricsSystem#getInstance() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JsonHandlerTest.java From calcite-avatica with Apache License 2.0 | 6 votes |
@Test public void testExecuteRequestWithNumberParameter() { final List<TypedValue> expectedParameterValues = new ArrayList<>(); final Service service = new ParameterValuesCheckingService(expectedParameterValues); final JsonService jsonService = new LocalJsonService(service); final JsonHandler jsonHandler = new JsonHandler(jsonService, NoopMetricsSystem.getInstance()); final List<TypedValue> parameterValues = Arrays.asList( TypedValue.create("NUMBER", new BigDecimal("123")), TypedValue.create("STRING", "calcite")); jsonHandler.apply( "{'request':'execute'," + "'parameterValues':[{'type':'NUMBER','value':123}," + "{'type':'STRING','value':'calcite'}]}"); assertThat(expectedParameterValues.size(), is(2)); assertThat(expectedParameterValues.get(0), is(parameterValues.get(0))); assertThat(expectedParameterValues.get(1), is(parameterValues.get(1))); }
Example 2
Source File: ProtobufHandlerTest.java From calcite-avatica with Apache License 2.0 | 5 votes |
@Before public void setupMocks() { // Mocks service = Mockito.mock(Service.class); translation = Mockito.mock(ProtobufTranslation.class); // Real objects handler = new ProtobufHandler(service, translation, NoopMetricsSystem.getInstance()); }
Example 3
Source File: DynamicAvaticaJsonHandler.java From kareldb with Apache License 2.0 | 4 votes |
public DynamicAvaticaJsonHandler(KarelDbConfig config, AvaticaHandler localHandler, UrlProvider urlProvider) { this(config, localHandler, urlProvider, NoopMetricsSystem.getInstance(), null); }
Example 4
Source File: QuicksqlServerMeta.java From Quicksql with MIT License | 4 votes |
public QuicksqlServerMeta(String url, Properties info) throws SQLException { this(url, info, NoopMetricsSystem.getInstance()); }
Example 5
Source File: JdbcMeta.java From calcite-avatica with Apache License 2.0 | 4 votes |
public JdbcMeta(String url, Properties info) throws SQLException { this(url, info, NoopMetricsSystem.getInstance()); }
Example 6
Source File: AvaticaProtobufHandler.java From calcite-avatica with Apache License 2.0 | 4 votes |
public AvaticaProtobufHandler(Service service) { this(service, NoopMetricsSystem.getInstance()); }
Example 7
Source File: AvaticaJsonHandler.java From calcite-avatica with Apache License 2.0 | 4 votes |
public AvaticaJsonHandler(Service service) { this(service, NoopMetricsSystem.getInstance(), null); }
Example 8
Source File: LocalService.java From calcite-avatica with Apache License 2.0 | 4 votes |
public LocalService(Meta meta) { this(meta, NoopMetricsSystem.getInstance()); }