本文整理了Java中org.apache.druid.query.QueryInterruptedException.getMessage
方法的一些代码示例,展示了QueryInterruptedException.getMessage
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueryInterruptedException.getMessage
方法的具体详情如下:
包路径:org.apache.druid.query.QueryInterruptedException
类名称:QueryInterruptedException
方法名:getMessage
暂无
代码示例来源:origin: apache/incubator-druid
@Override
public String toString()
{
return StringUtils.format(
"QueryInterruptedException{msg=%s, code=%s, class=%s, host=%s}",
getMessage(),
errorCode,
errorClass,
host
);
}
代码示例来源:origin: apache/incubator-druid
new QueryInterruptedException(new QueryInterruptedException(new CancellationException())).getMessage()
);
Assert.assertEquals(
null,
new QueryInterruptedException(new CancellationException()).getMessage()
);
Assert.assertEquals(
null,
new QueryInterruptedException(new InterruptedException()).getMessage()
);
Assert.assertEquals(
null,
new QueryInterruptedException(new TimeoutException()).getMessage()
);
Assert.assertEquals(
null,
new QueryInterruptedException(null).getMessage()
);
Assert.assertEquals(
"too many!",
new QueryInterruptedException(new ResourceLimitExceededException("too many!")).getMessage()
);
Assert.assertEquals(
"Something bad!",
new QueryInterruptedException(new ISE("Something bad!")).getMessage()
);
Assert.assertEquals(
"Something bad!",
new QueryInterruptedException(new QueryInterruptedException(new ISE("Something bad!"))).getMessage()
代码示例来源:origin: apache/incubator-druid
@Test
public void testCannotConvert() throws Exception
{
// SELECT + ORDER unsupported
final QueryInterruptedException exception = doPost(
new SqlQuery("SELECT dim1 FROM druid.foo ORDER BY dim1", ResultFormat.OBJECT, false, null)
).lhs;
Assert.assertNotNull(exception);
Assert.assertEquals(QueryInterruptedException.UNKNOWN_EXCEPTION, exception.getErrorCode());
Assert.assertEquals(ISE.class.getName(), exception.getErrorClass());
Assert.assertTrue(
exception.getMessage()
.contains("Cannot build plan for query: SELECT dim1 FROM druid.foo ORDER BY dim1")
);
checkSqlRequestLog(false);
}
代码示例来源:origin: apache/incubator-druid
@Test
public void testCannotValidate() throws Exception
{
final QueryInterruptedException exception = doPost(
new SqlQuery(
"SELECT dim4 FROM druid.foo",
ResultFormat.OBJECT,
false,
null
)
).lhs;
Assert.assertNotNull(exception);
Assert.assertEquals(QueryInterruptedException.UNKNOWN_EXCEPTION, exception.getErrorCode());
Assert.assertEquals(ValidationException.class.getName(), exception.getErrorClass());
Assert.assertTrue(exception.getMessage().contains("Column 'dim4' not found in any table"));
checkSqlRequestLog(false);
}
代码示例来源:origin: apache/incubator-druid
Assert.assertEquals("testing2", actualException.getMessage());
Assert.assertEquals(hostName, actualException.getHost());
EasyMock.verify(httpClient);
代码示例来源:origin: apache/incubator-druid
Assert.assertEquals(
null,
roundTrip(new QueryInterruptedException(new QueryInterruptedException(new CancellationException()))).getMessage()
);
Assert.assertEquals(
Assert.assertEquals(
"Something bad!",
roundTrip(new QueryInterruptedException(new ISE("Something bad!"))).getMessage()
);
Assert.assertEquals(
"Something bad!",
roundTrip(new QueryInterruptedException(new QueryInterruptedException(new ISE("Something bad!")))).getMessage()
);
Assert.assertEquals(
代码示例来源:origin: org.apache.druid/druid-processing
@Override
public String toString()
{
return StringUtils.format(
"QueryInterruptedException{msg=%s, code=%s, class=%s, host=%s}",
getMessage(),
errorCode,
errorClass,
host
);
}
内容来源于网络,如有侵权,请联系作者删除!