[
https://issues.apache.org/jira/browse/PHOENIX-4817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16548502#comment-16548502
]
ASF GitHub Bot commented on PHOENIX-4817:
-----------------------------------------
Github user MrSandmanRUS commented on a diff in the pull request:
https://github.com/apache/phoenix/pull/311#discussion_r203550322
--- Diff:
phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/TraceServlet.java
---
@@ -98,33 +108,36 @@ protected String getCount(String countby) {
if(countby == null) {
countby = DEFAULT_COUNTBY;
}
- // Throws exception if the column not present in the trace table.
- MetricInfo.getColumnName(countby.toLowerCase());
String sqlQuery = "SELECT "+countby+", COUNT(*) AS count FROM " +
TRACING_TABLE + " GROUP BY "+countby+" HAVING COUNT(*) > 1 ";
json = getResults(sqlQuery);
return json;
}
//search the trace over parent id or trace id
- protected String searchTrace(String parentId, String traceId,String
logic) {
+ protected String searchTrace(String parentId, String traceId, String
logic) {
+
String json = null;
String query = null;
// Check the parent Id, trace id type or long or not.
try {
+ if (parentId != null) {
Long.parseLong(parentId);
+ }
+ if (traceId != null) {
Long.parseLong(traceId);
+ }
} catch (NumberFormatException e) {
- throw new RuntimeException("The passed parentId/traceId is not
a number.", e);
+ throw new RuntimeException("The passed parentId/traceId is not a
number.", e);
}
- if(!logic.equals(LOGIC_AND) || !logic.equals(LOGIC_OR)) {
- throw new RuntimeException("Wrong logical operator passed to
the query. Only "+ LOGIC_AND+","+LOGIC_OR+" are allowed.") ;
+ if (logic != null && (!logic.equals(LOGIC_AND) &&
!logic.equals(LOGIC_OR))) {
--- End diff --
Fixed
> Phoenix Tracing Web Application
> -------------------------------
>
> Key: PHOENIX-4817
> URL: https://issues.apache.org/jira/browse/PHOENIX-4817
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.14.0, 4.13.1
> Environment: maven 3+, JDK7
> Reporter: Vitaliy
> Priority: Minor
> Labels: patch
>
> # Phoenix Tracing Web Application can not be started, because traceserver.py
> does not contain required dependencies.
> # The path to the folder webapp is incorrectly specified, so Phoenix Tracing
> Web Application can not find this folder.
> # Phoenix Tracing Web Application does not check null value where it is
> needed, so the application can not load List, Dependency Tree and Features.
> # Phoenix Tracing Web Application creates a query with the wrong table
> column names.
> # Phoenix Tracing Web Application has only the default tracing-table name
> (SYSTEM.TRACING_STATS) and does not get tracing-table name via hbase-site.xml.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)