/** * Rethrows an exception, even if it is not in the method signature. * * @param t The exception to rethrow. */ public static void rethrowException(Throwable t) { /* Error can be thrown anywhere and is type erased on rethrowExceptionInner, making the cast in rethrowExceptionInner a no-op, allowing us to rethrow the exception without declaring it. */ Utils.<Error>rethrowExceptionInner(t); }
ControllerGauge(String unit, boolean global) { this.unit = unit; this.global = global; this.gaugeName = Utils.toCamelCase(name().toLowerCase()); }
ServerMeter(String unit, boolean global) { this.unit = unit; this.global = global; this.meterName = Utils.toCamelCase(name().toLowerCase()); }
public SSLContext generate() { SSLContext sslContext = null; try { TrustManager[] trustManagers = setupTrustManagers(); KeyManager[] keyManagers = setupKeyManagers(); sslContext = SSLContext.getInstance(SECURITY_ALGORITHM); sslContext.init(keyManagers, trustManagers, null); } catch (Exception e) { Utils.rethrowException(e); } return sslContext; }
@Override public RecordReader getRecordReader() { try { _recordReader.rewind(); } catch (Exception e) { LOGGER.error("Caught exception while rewinding record reader", e); Utils.rethrowException(e); } return _recordReader; } }
public PinotControllerResponseFilter() { String controllerHost = NetUtil.getHostnameOrAddress(); if (controllerHost != null) { _controllerHost = controllerHost; } else { _controllerHost = UNKNOWN; } String controllerVersion = Utils.getComponentVersions().get(CONTROLLER_COMPONENT); if (controllerVersion != null) { _controllerVersion = controllerVersion; } else { _controllerVersion = UNKNOWN; } }
MinionMeter(String unit, boolean global) { _meterName = Utils.toCamelCase(name().toLowerCase()); _unit = unit; _global = global; }
BrokerGauge(String unit, boolean global) { this.unit = unit; this.global = global; this.brokerGaugeName = Utils.toCamelCase(name().toLowerCase()); }
ControllerMeter(String unit, boolean global) { this.unit = unit; this.global = global; this.brokerMeterName = Utils.toCamelCase(name().toLowerCase()); }
BrokerMeter(String unit, boolean global) { this.unit = unit; this.global = global; this.brokerMeterName = Utils.toCamelCase(name().toLowerCase()); }
ServerGauge(String unit, boolean global) { this.unit = unit; this.global = global; this.gaugeName = Utils.toCamelCase(name().toLowerCase()); }
BrokerTimer(boolean global) { this.global = global; this.timerName = Utils.toCamelCase(name().toLowerCase()); }
ServerTimer(String unit, boolean global) { this.global = global; this.timerName = Utils.toCamelCase(name().toLowerCase()); }
ControllerTimer(String unit, boolean global) { this.global = global; this.timerName = Utils.toCamelCase(name().toLowerCase()); }
BrokerQueryPhase() { queryPhaseName = Utils.toCamelCase(name().toLowerCase()); }
ServerQueryPhase() { queryPhaseName = Utils.toCamelCase(name().toLowerCase()); }
@Override public void clear() { try { close(); init(); } catch (IOException e) { Utils.rethrowException(e); } }
MinionGauge(String unit, boolean global) { _gaugeName = Utils.toCamelCase(name().toLowerCase()); _unit = unit; _global = global; }
MinionTimer(boolean global) { _timerName = Utils.toCamelCase(name().toLowerCase()); _global = global; }
@Test public void testToCamelCase() { Assert.assertEquals(Utils.toCamelCase("Hello world!"), "HelloWorld"); Assert.assertEquals(Utils.toCamelCase("blah blah blah"), "blahBlahBlah"); Assert.assertEquals(Utils.toCamelCase("the quick __--???!!! brown fox?"), "theQuickBrownFox"); }