You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spot.apache.org by le...@apache.org on 2017/07/03 05:07:45 UTC
[1/3] incubator-spot git commit: Changed else's condition for when
the code is not found in the iana catalog
Repository: incubator-spot
Updated Branches:
refs/heads/SPOT-35_graphql_api 0c2c27db5 -> ba986c938
Changed else's condition for when the code is not found in the iana catalog
Project: http://git-wip-us.apache.org/repos/asf/incubator-spot/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spot/commit/f5a27765
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spot/tree/f5a27765
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spot/diff/f5a27765
Branch: refs/heads/SPOT-35_graphql_api
Commit: f5a27765b94dc398ef9816c7f2310c3f8a623573
Parents: 0c2c27d
Author: LedaLima <le...@apache.org>
Authored: Sun Jul 2 14:01:45 2017 -0500
Committer: LedaLima <le...@apache.org>
Committed: Sun Jul 2 14:01:45 2017 -0500
----------------------------------------------------------------------
spot-oa/oa/components/iana/iana_transform.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-spot/blob/f5a27765/spot-oa/oa/components/iana/iana_transform.py
----------------------------------------------------------------------
diff --git a/spot-oa/oa/components/iana/iana_transform.py b/spot-oa/oa/components/iana/iana_transform.py
index 34730bd..a49c8f9 100644
--- a/spot-oa/oa/components/iana/iana_transform.py
+++ b/spot-oa/oa/components/iana/iana_transform.py
@@ -82,20 +82,20 @@ class IanaTransform(object):
if key in self._qclass_dict:
return self._qclass_dict[key]
else:
- return ""
+ return "Unknown ({0})".format(key)
if column == COL_QTYPE:
if key in self._qtype_dict:
return self._qtype_dict[key]
else:
- return ""
+ return "Unknown ({0})".format(key)
if column == COL_RCODE:
if key in self._rcode_dict:
return self._rcode_dict[key]
else:
- return ""
+ return "Unknown ({0})".format(key)
if column == COL_PRESP:
if key in self._http_rcode_dict:
return self._http_rcode_dict[key]
else:
- return ""
+ return "Unknown ({0})".format(key)
[3/3] incubator-spot git commit: Removed extra spaces in code
Posted by le...@apache.org.
Removed extra spaces in code
Project: http://git-wip-us.apache.org/repos/asf/incubator-spot/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spot/commit/ba986c93
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spot/tree/ba986c93
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spot/diff/ba986c93
Branch: refs/heads/SPOT-35_graphql_api
Commit: ba986c938f1c2d0ba9f487197430ef030f8dd5b8
Parents: 3b8b0f7
Author: LedaLima <le...@apache.org>
Authored: Sun Jul 2 16:41:09 2017 -0500
Committer: LedaLima <le...@apache.org>
Committed: Sun Jul 2 16:41:09 2017 -0500
----------------------------------------------------------------------
spot-oa/api/resources/impala_engine.py | 3 +--
spot-oa/oa/proxy/proxy_oa.py | 4 +---
2 files changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-spot/blob/ba986c93/spot-oa/api/resources/impala_engine.py
----------------------------------------------------------------------
diff --git a/spot-oa/api/resources/impala_engine.py b/spot-oa/api/resources/impala_engine.py
index a60bdd4..d6b4c55 100644
--- a/spot-oa/api/resources/impala_engine.py
+++ b/spot-oa/api/resources/impala_engine.py
@@ -10,10 +10,9 @@ def create_connection():
def execute_query(query,fetch=False):
- impala_cursor = create_connection()
+ impala_cursor = create_connection()
impala_cursor.execute(query)
-
return impala_cursor if not fetch else impala_cursor.fetchall()
def execute_query_as_list(query):
http://git-wip-us.apache.org/repos/asf/incubator-spot/blob/ba986c93/spot-oa/oa/proxy/proxy_oa.py
----------------------------------------------------------------------
diff --git a/spot-oa/oa/proxy/proxy_oa.py b/spot-oa/oa/proxy/proxy_oa.py
index 148383d..1fcef19 100644
--- a/spot-oa/oa/proxy/proxy_oa.py
+++ b/spot-oa/oa/proxy/proxy_oa.py
@@ -21,8 +21,7 @@ import json
import shutil
import sys
import datetime
-import csv, math
-import urllib
+import csv, math
from collections import OrderedDict
from utils import Util
from components.data.data import Data
@@ -278,7 +277,6 @@ class OA(object):
self._get_proxy_details(fulluri,clientip,year,month,day,hh,proxy_iana)
-
def _get_proxy_details(self,fulluri,clientip,year,month,day,hh,proxy_iana):
limit = 250
value_string = ""
[2/3] incubator-spot git commit: Escaping single quote character in
fulluri for proxy
Posted by le...@apache.org.
Escaping single quote character in fulluri for proxy
Project: http://git-wip-us.apache.org/repos/asf/incubator-spot/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spot/commit/3b8b0f7f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spot/tree/3b8b0f7f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spot/diff/3b8b0f7f
Branch: refs/heads/SPOT-35_graphql_api
Commit: 3b8b0f7f463e1f5cf23fa560a42e1eedcd826fb0
Parents: f5a2776
Author: LedaLima <le...@apache.org>
Authored: Sun Jul 2 16:30:52 2017 -0500
Committer: LedaLima <le...@apache.org>
Committed: Sun Jul 2 16:30:52 2017 -0500
----------------------------------------------------------------------
spot-oa/api/resources/impala_engine.py | 3 ++-
spot-oa/oa/proxy/proxy_oa.py | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-spot/blob/3b8b0f7f/spot-oa/api/resources/impala_engine.py
----------------------------------------------------------------------
diff --git a/spot-oa/api/resources/impala_engine.py b/spot-oa/api/resources/impala_engine.py
index d6b4c55..a60bdd4 100644
--- a/spot-oa/api/resources/impala_engine.py
+++ b/spot-oa/api/resources/impala_engine.py
@@ -10,9 +10,10 @@ def create_connection():
def execute_query(query,fetch=False):
- impala_cursor = create_connection()
+ impala_cursor = create_connection()
impala_cursor.execute(query)
+
return impala_cursor if not fetch else impala_cursor.fetchall()
def execute_query_as_list(query):
http://git-wip-us.apache.org/repos/asf/incubator-spot/blob/3b8b0f7f/spot-oa/oa/proxy/proxy_oa.py
----------------------------------------------------------------------
diff --git a/spot-oa/oa/proxy/proxy_oa.py b/spot-oa/oa/proxy/proxy_oa.py
index 505c43e..148383d 100644
--- a/spot-oa/oa/proxy/proxy_oa.py
+++ b/spot-oa/oa/proxy/proxy_oa.py
@@ -22,6 +22,7 @@ import shutil
import sys
import datetime
import csv, math
+import urllib
from collections import OrderedDict
from utils import Util
from components.data.data import Data
@@ -287,7 +288,7 @@ class OA(object):
referer, uriport, serverip, scbytes, csbytes, fulluri, {5} as hh
FROM {0}.{1} WHERE y='{2}' AND m='{3}' AND d='{4}' AND
h='{5}' AND fulluri='{6}' AND clientip='{7}' LIMIT {8};
- """).format(self._db,self._table_name, year,month,day,hh,fulluri,clientip,limit)
+ """).format(self._db,self._table_name, year,month,day,hh,fulluri.replace("'","\\'"),clientip,limit)
detail_results = impala.execute_query(query_to_load)