hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shiv...@apache.org
Subject incubator-hawq git commit: HAWQ-459. change item to pattern
Date Wed, 16 Mar 2016 22:35:14 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/HAWQ-459 2a8104294 -> 8ac035d5e


HAWQ-459. change item to pattern


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

Branch: refs/heads/HAWQ-459
Commit: 8ac035d5e03f82c224bc8e009fcf13b4352dd1d7
Parents: 2a81042
Author: Shivram Mani <shivram.mani@gmail.com>
Authored: Wed Mar 16 15:35:07 2016 -0700
Committer: Shivram Mani <shivram.mani@gmail.com>
Committed: Wed Mar 16 15:35:07 2016 -0700

----------------------------------------------------------------------
 .../java/org/apache/hawq/pxf/api/MetadataFetcher.java   |  4 ++--
 .../hawq/pxf/plugins/hive/HiveMetadataFetcher.java      |  4 ++--
 .../apache/hawq/pxf/service/rest/MetadataResource.java  | 12 ++++++------
 3 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/8ac035d5/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/MetadataFetcher.java
----------------------------------------------------------------------
diff --git a/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/MetadataFetcher.java b/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/MetadataFetcher.java
index 1808774..8ba25dc 100644
--- a/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/MetadataFetcher.java
+++ b/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/MetadataFetcher.java
@@ -39,9 +39,9 @@ public abstract class MetadataFetcher {
     /**
      * Gets a metadata of a given table
      *
-     * @param itemName table/file name or pattern
+     * @param pattern table/file name or pattern
      * @return metadata of given item(s)
      * @throws Exception if metadata information could not be retrieved
      */
-    public abstract List<Metadata> getMetadata(String itemName) throws Exception;
+    public abstract List<Metadata> getMetadata(String pattern) throws Exception;
 }

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/8ac035d5/pxf/pxf-hive/src/main/java/org/apache/hawq/pxf/plugins/hive/HiveMetadataFetcher.java
----------------------------------------------------------------------
diff --git a/pxf/pxf-hive/src/main/java/org/apache/hawq/pxf/plugins/hive/HiveMetadataFetcher.java
b/pxf/pxf-hive/src/main/java/org/apache/hawq/pxf/plugins/hive/HiveMetadataFetcher.java
index e41d537..367b0a5 100644
--- a/pxf/pxf-hive/src/main/java/org/apache/hawq/pxf/plugins/hive/HiveMetadataFetcher.java
+++ b/pxf/pxf-hive/src/main/java/org/apache/hawq/pxf/plugins/hive/HiveMetadataFetcher.java
@@ -50,9 +50,9 @@ public class HiveMetadataFetcher extends MetadataFetcher {
     }
 
     @Override
-    public List<Metadata> getMetadata(String tableName) throws Exception {
+    public List<Metadata> getMetadata(String pattern) throws Exception {
 
-        List<Metadata.Item> tblsDesc = HiveUtilities.extractTablesFromPattern(client,
tableName);
+        List<Metadata.Item> tblsDesc = HiveUtilities.extractTablesFromPattern(client,
pattern);
         List<Metadata> metadataList = new ArrayList<Metadata>();
 
         for(Metadata.Item tblDesc: tblsDesc) {

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/8ac035d5/pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/rest/MetadataResource.java
----------------------------------------------------------------------
diff --git a/pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/rest/MetadataResource.java
b/pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/rest/MetadataResource.java
index 1186056..44d3ef1 100644
--- a/pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/rest/MetadataResource.java
+++ b/pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/rest/MetadataResource.java
@@ -57,7 +57,7 @@ public class MetadataResource extends RestResource {
     }
 
     /**
-     * This function queries the underlying store based on the given profile to get schema
for the given item(s)
+     * This function queries the underlying store based on the given profile to get schema
for items that match the given pattern
      * metadata: Item name, field names, field types. The types are converted
      * from the underlying types to HAWQ types.
      * Unsupported types result in an error. <br>
@@ -69,9 +69,9 @@ public class MetadataResource extends RestResource {
      * @param servletContext servlet context
      * @param headers http headers
      * @param profile based on this the metadata source can be inferred
-     * @param item table/file name or pattern in the given source
-     * @return JSON formatted response with metadata for given item(s)
-     * @throws Exception if connection to the source/catalog failed, item didn't exist or
+     * @param pattern table/file name or pattern in the given source
+     * @return JSON formatted response with metadata of each item that corresponds to the
pattern
+     * @throws Exception if connection to the source/catalog failed, item didn't exist for
the pattern
      *             its type or fields are not supported
      */
     @GET
@@ -80,7 +80,7 @@ public class MetadataResource extends RestResource {
     public Response read(@Context final ServletContext servletContext,
                          @Context final HttpHeaders headers,
                          @QueryParam("profile") final String profile,
-                         @QueryParam("item") final String item)
+                         @QueryParam("pattern") final String pattern)
             throws Exception {
         LOG.debug("getMetadata started");
         String jsonOutput;
@@ -89,7 +89,7 @@ public class MetadataResource extends RestResource {
             MetadataFetcher metadataFetcher = MetadataFetcherFactory.create(profile.toLowerCase());
 
             // 2. get Metadata
-            List<Metadata> metadata = metadataFetcher.getMetadata(item);
+            List<Metadata> metadata = metadataFetcher.getMetadata(pattern);
 
             // 3. serialize to JSON
             jsonOutput = MetadataResponseFormatter.formatResponseString(metadata);


Mime
View raw message