Commit cee73f6c by Venkatesh Seetharam

BUG-37674 quick start is broken post rest api refactoring

parent 36c73675
...@@ -18,13 +18,11 @@ ...@@ -18,13 +18,11 @@
package org.apache.hadoop.metadata; package org.apache.hadoop.metadata;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.commons.configuration.PropertiesConfiguration;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import java.io.File; import java.io.File;
import java.net.MalformedURLException;
import java.net.URL; import java.net.URL;
public class PropertiesUtil { public class PropertiesUtil {
...@@ -33,11 +31,11 @@ public class PropertiesUtil { ...@@ -33,11 +31,11 @@ public class PropertiesUtil {
private static final String APPLICATION_PROPERTIES = "application.properties"; private static final String APPLICATION_PROPERTIES = "application.properties";
public static final String CLIENT_PROPERTIES = "client.properties"; public static final String CLIENT_PROPERTIES = "client.properties";
public static final PropertiesConfiguration getApplicationProperties() throws MetadataException { public static PropertiesConfiguration getApplicationProperties() throws MetadataException {
return getPropertiesConfiguration(APPLICATION_PROPERTIES); return getPropertiesConfiguration(APPLICATION_PROPERTIES);
} }
public static final PropertiesConfiguration getClientProperties() throws MetadataException { public static PropertiesConfiguration getClientProperties() throws MetadataException {
return getPropertiesConfiguration(CLIENT_PROPERTIES); return getPropertiesConfiguration(CLIENT_PROPERTIES);
} }
......
...@@ -30,9 +30,9 @@ metadata.graph.index.search.elasticsearch.create.sleep=2000 ...@@ -30,9 +30,9 @@ metadata.graph.index.search.elasticsearch.create.sleep=2000
######### Hive Lineage Configs ######### ######### Hive Lineage Configs #########
# This models follows the quick-start guide # This models follows the quick-start guide
metadata.lineage.hive.table.type.name=hive_table metadata.lineage.hive.table.type.name=Table
metadata.lineage.hive.table.column.name=columns metadata.lineage.hive.table.column.name=columns
metadata.lineage.hive.process.type.name=hive_process metadata.lineage.hive.process.type.name=LoadProcess
metadata.lineage.hive.process.inputs.name=inputTables metadata.lineage.hive.process.inputs.name=inputTables
metadata.lineage.hive.process.outputs.name=outputTables metadata.lineage.hive.process.outputs.name=outputTables
#Currently unused #Currently unused
......
...@@ -300,7 +300,7 @@ public class QuickStart { ...@@ -300,7 +300,7 @@ public class QuickStart {
String entityJSON = InstanceSerialization.toJson(referenceable, true); String entityJSON = InstanceSerialization.toJson(referenceable, true);
System.out.println("Submitting new entity= " + entityJSON); System.out.println("Submitting new entity= " + entityJSON);
JSONObject jsonObject = metadataServiceClient.createEntity(entityJSON); JSONObject jsonObject = metadataServiceClient.createEntity(entityJSON);
String guid = jsonObject.getString(MetadataServiceClient.RESULTS); String guid = jsonObject.getString(MetadataServiceClient.GUID);
System.out.println("created instance for type " + typeName + ", guid: " + guid); System.out.println("created instance for type " + typeName + ", guid: " + guid);
// return the Id for created instance with guid // return the Id for created instance with guid
......
...@@ -82,7 +82,7 @@ public class MetadataDiscoveryResource { ...@@ -82,7 +82,7 @@ public class MetadataDiscoveryResource {
return searchUsingGremlinQuery(query); return searchUsingGremlinQuery(query);
} }
JSONObject response = null; JSONObject response;
try { // fall back to dsl try { // fall back to dsl
final String jsonResultStr = discoveryService.searchByDSL(query); final String jsonResultStr = discoveryService.searchByDSL(query);
......
...@@ -18,15 +18,11 @@ ...@@ -18,15 +18,11 @@
package org.apache.hadoop.metadata.web.resources; package org.apache.hadoop.metadata.web.resources;
import com.google.common.base.Preconditions;
import com.google.inject.Guice;
import com.sun.jersey.api.client.ClientResponse; import com.sun.jersey.api.client.ClientResponse;
import org.apache.hadoop.metadata.MetadataException; import org.apache.hadoop.metadata.MetadataException;
import org.apache.hadoop.metadata.MetadataServiceClient; import org.apache.hadoop.metadata.MetadataServiceClient;
import org.apache.hadoop.metadata.services.MetadataService; import org.apache.hadoop.metadata.services.MetadataService;
import org.apache.hadoop.metadata.typesystem.types.DataTypes; import org.apache.hadoop.metadata.typesystem.types.DataTypes;
import org.apache.hadoop.metadata.typesystem.types.IDataType;
import org.apache.hadoop.metadata.web.listeners.GuiceServletConfig;
import org.apache.hadoop.metadata.web.util.Servlets; import org.apache.hadoop.metadata.web.util.Servlets;
import org.codehaus.jettison.json.JSONArray; import org.codehaus.jettison.json.JSONArray;
import org.codehaus.jettison.json.JSONException; import org.codehaus.jettison.json.JSONException;
...@@ -37,9 +33,18 @@ import org.slf4j.LoggerFactory; ...@@ -37,9 +33,18 @@ import org.slf4j.LoggerFactory;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.*; import javax.ws.rs.Consumes;
import javax.ws.rs.core.*; import javax.ws.rs.DefaultValue;
import java.net.URI; import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -141,7 +146,7 @@ public class TypesResource { ...@@ -141,7 +146,7 @@ public class TypesResource {
public Response getTypesByFilter(@Context HttpServletRequest request, public Response getTypesByFilter(@Context HttpServletRequest request,
@DefaultValue(TYPE_ALL) @QueryParam("type") String type) { @DefaultValue(TYPE_ALL) @QueryParam("type") String type) {
try { try {
List<String> result = null; List<String> result;
if (TYPE_ALL.equals(type)) { if (TYPE_ALL.equals(type)) {
result = metadataService.getTypeNamesList(); result = metadataService.getTypeNamesList();
} else { } else {
......
...@@ -29,7 +29,6 @@ metadata.graph.index.search.elasticsearch.local-mode=true ...@@ -29,7 +29,6 @@ metadata.graph.index.search.elasticsearch.local-mode=true
metadata.graph.index.search.elasticsearch.create.sleep=2000 metadata.graph.index.search.elasticsearch.create.sleep=2000
######### Hive Lineage Configs ######### ######### Hive Lineage Configs #########
# This models follows the quick-start guide
metadata.lineage.hive.table.type.name=hive_table metadata.lineage.hive.table.type.name=hive_table
metadata.lineage.hive.column.type.name=hive_column metadata.lineage.hive.column.type.name=hive_column
metadata.lineage.hive.table.column.name=columns metadata.lineage.hive.table.column.name=columns
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment