org.apache.druid.query.QueryInterruptedException.getMessage()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(70)

本文整理了Java中org.apache.druid.query.QueryInterruptedException.getMessage方法的一些代码示例,展示了QueryInterruptedException.getMessage的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueryInterruptedException.getMessage方法的具体详情如下:
包路径:org.apache.druid.query.QueryInterruptedException
类名称:QueryInterruptedException
方法名:getMessage

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
 );
}

相关文章