You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by ma...@apache.org on 2015/08/11 05:15:51 UTC

incubator-ranger git commit: RANGER-596: Changed location of geolocation data file, and updated tests

Repository: incubator-ranger
Updated Branches:
  refs/heads/tag-policy 9a6e641fa -> dba2bea65


RANGER-596: Changed location of geolocation data file, and updated tests

Signed-off-by: Madhan Neethiraj <ma...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/dba2bea6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/dba2bea6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/dba2bea6

Branch: refs/heads/tag-policy
Commit: dba2bea65734c375b9f2497bd83f371ddca9fdda
Parents: 9a6e641
Author: Abhay Kulkarni <ak...@hortonworks.com>
Authored: Mon Aug 10 15:28:44 2015 -0700
Committer: Madhan Neethiraj <ma...@apache.org>
Committed: Mon Aug 10 20:08:53 2015 -0700

----------------------------------------------------------------------
 .../src/main/resources/etc/ranger/geo/geo.txt   | 29 ++++++++++++++++++++
 agents-common/src/test/resources/geo/geo.txt    | 29 --------------------
 .../policyengine/test_policyengine_hdfs.json    |  2 +-
 3 files changed, 30 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/dba2bea6/agents-common/src/main/resources/etc/ranger/geo/geo.txt
----------------------------------------------------------------------
diff --git a/agents-common/src/main/resources/etc/ranger/geo/geo.txt b/agents-common/src/main/resources/etc/ranger/geo/geo.txt
new file mode 100644
index 0000000..6e38db3
--- /dev/null
+++ b/agents-common/src/main/resources/etc/ranger/geo/geo.txt
@@ -0,0 +1,29 @@
+# This is a sample geolocation data format used by Ranger
+# If a line contains '#' as a first-nonblank character then it is considered a comment line
+# First non-comment line in the file must be metadata line; metadata line contains '!' as first character
+# Format of metadata and data lines is strictly Comma-Separated-Values. Spaces are not allowed to surround commas.
+# Only IP-4 address values in dot-notation are supported.
+#
+FROM_IP,TO_IP,COUNTRY_CODE,COUNTRY_NAME,STATE,CITY,ZIP,LAT,LONG
+10.0.0.255,10.0.3.0,US,United States,CA
+20.0.100.100,20.0.100.109,US,United States,MT
+20.0.100.80,20.0.100.89,CA,Canada
+20.0.100.110,20.0.100.119,BR,Brazil
+20.0.100.70,20.0.100.73,IN,India
+20.0.100.120,20.0.100.129,NG,Nigeria
+20.0.100.90,20.0.100.94,AUS,Austalia
+20.0.100.74,20.0.100.79,AN,Angola
+20.0.100.95,20.0.100.99,UK,United Kingdom
+192.128.100.1,192.128.100.75,FR,France
+1.0.0.0,1.0.0.255,AU,Australia,Queensland,Brisbane
+1.0.1.0,1.0.3.255,CN,China,Fujian,Fuzhou,
+1.0.4.0,1.0.4.255,AU,Australia,Victoria,Melbourne,
+1.0.5.0,1.0.7.255,AU,Australia,-,-,
+1.0.8.0,1.0.15.255,CN,China,Guangdong,Guangzhou,
+255.255.255.0,255.255.255.255,CN,China,Guangdong,Guangzhou,
+1.0.16.0,1.0.31.255,JP,Japan,Tokyo,Tokyo,
+1.0.32.0,1.0.63.255,CN,China,Guangdong,Guangzhou,
+1.0.64.0,1.0.79.255,JP,Japan,Hiroshima,Hiroshima,
+1.0.80.0,1.0.83.255,JP,Japan,Tokyo,Tokyo,
+128.101.101.100,128.101.101.255,US,United States,Minnesota,Minneapolis
+#16797696,16798719,JP,Japan,Tokyo,Tokyo

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/dba2bea6/agents-common/src/test/resources/geo/geo.txt
----------------------------------------------------------------------
diff --git a/agents-common/src/test/resources/geo/geo.txt b/agents-common/src/test/resources/geo/geo.txt
deleted file mode 100644
index 6e38db3..0000000
--- a/agents-common/src/test/resources/geo/geo.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-# This is a sample geolocation data format used by Ranger
-# If a line contains '#' as a first-nonblank character then it is considered a comment line
-# First non-comment line in the file must be metadata line; metadata line contains '!' as first character
-# Format of metadata and data lines is strictly Comma-Separated-Values. Spaces are not allowed to surround commas.
-# Only IP-4 address values in dot-notation are supported.
-#
-FROM_IP,TO_IP,COUNTRY_CODE,COUNTRY_NAME,STATE,CITY,ZIP,LAT,LONG
-10.0.0.255,10.0.3.0,US,United States,CA
-20.0.100.100,20.0.100.109,US,United States,MT
-20.0.100.80,20.0.100.89,CA,Canada
-20.0.100.110,20.0.100.119,BR,Brazil
-20.0.100.70,20.0.100.73,IN,India
-20.0.100.120,20.0.100.129,NG,Nigeria
-20.0.100.90,20.0.100.94,AUS,Austalia
-20.0.100.74,20.0.100.79,AN,Angola
-20.0.100.95,20.0.100.99,UK,United Kingdom
-192.128.100.1,192.128.100.75,FR,France
-1.0.0.0,1.0.0.255,AU,Australia,Queensland,Brisbane
-1.0.1.0,1.0.3.255,CN,China,Fujian,Fuzhou,
-1.0.4.0,1.0.4.255,AU,Australia,Victoria,Melbourne,
-1.0.5.0,1.0.7.255,AU,Australia,-,-,
-1.0.8.0,1.0.15.255,CN,China,Guangdong,Guangzhou,
-255.255.255.0,255.255.255.255,CN,China,Guangdong,Guangzhou,
-1.0.16.0,1.0.31.255,JP,Japan,Tokyo,Tokyo,
-1.0.32.0,1.0.63.255,CN,China,Guangdong,Guangzhou,
-1.0.64.0,1.0.79.255,JP,Japan,Hiroshima,Hiroshima,
-1.0.80.0,1.0.83.255,JP,Japan,Tokyo,Tokyo,
-128.101.101.100,128.101.101.255,US,United States,Minnesota,Minneapolis
-#16797696,16798719,JP,Japan,Tokyo,Tokyo

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/dba2bea6/agents-common/src/test/resources/policyengine/test_policyengine_hdfs.json
----------------------------------------------------------------------
diff --git a/agents-common/src/test/resources/policyengine/test_policyengine_hdfs.json b/agents-common/src/test/resources/policyengine/test_policyengine_hdfs.json
index 53735f6..d5df5e2 100644
--- a/agents-common/src/test/resources/policyengine/test_policyengine_hdfs.json
+++ b/agents-common/src/test/resources/policyengine/test_policyengine_hdfs.json
@@ -19,7 +19,7 @@
         "name" : "GeolocationEnricher",
         "enricher" : "org.apache.ranger.plugin.contextenricher.RangerFileBasedGeolocationProvider",
         "enricherOptions" : {
-          "geolocation.source.loader.options": "{'FilePath':'/geo/geo.txt', 'ForceRead':'false', 'IPInDotFormat':'true' }"
+          "geolocation.source.loader.options": "{'FilePath':'/etc/ranger/geo/geo.txt', 'ForceRead':'false', 'IPInDotFormat':'true' }"
           ,"geolocation.meta.prefix": "TEST_"
         }
       }