You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by ar...@apache.org on 2016/03/10 19:29:13 UTC
[1/4] incubator-trafodion git commit: Removed the unused and declared
dependencies.
Repository: incubator-trafodion
Updated Branches:
refs/heads/master 41e575942 -> 0da990344
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/java/org/trafodion/dcs/rest/model/ServerModel.java
----------------------------------------------------------------------
diff --git a/dcs/src/main/java/org/trafodion/dcs/rest/model/ServerModel.java b/dcs/src/main/java/org/trafodion/dcs/rest/model/ServerModel.java
deleted file mode 100644
index e254eca..0000000
--- a/dcs/src/main/java/org/trafodion/dcs/rest/model/ServerModel.java
+++ /dev/null
@@ -1,530 +0,0 @@
-/**
-* @@@ START COPYRIGHT @@@
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-* @@@ END COPYRIGHT @@@
- */
-package org.trafodion.dcs.rest.model;
-
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Scanner;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-
-/**
- * Simple representation of an DCS instance.
- */
-@XmlRootElement(name = "DcsStatus")
-public class ServerModel implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * Represents a DcsMaster server.
- */
- public static class DcsMaster {
- private String hostName;
- private String listenerPort;
- private String listenerPortRange;
- private String startTimestamp;
- private List<DcsServer> dcsServerList = new ArrayList<DcsServer>();
-
- /**
- * Default constructor
- */
- public DcsMaster() {
- }
-
- /**
- * Constructor
- *
- * @param hostName
- * the host name
- * @param listenerPort
- * the port its listening on
- * @param listenerPortRange
- * the listener port range
- * @param startTimestamp
- * the start timestamp
- */
- public DcsMaster(String hostName, String listenerPort,
- String listenerPortRange, String startTimestamp) {
- this.hostName = hostName;
- this.listenerPort = listenerPort;
- this.listenerPortRange = listenerPortRange;
- this.startTimestamp = startTimestamp;
- }
-
- /**
- * @return the host name
- */
- @XmlAttribute
- public String getHostName() {
- return hostName;
- }
-
- /**
- * @return the listener port number
- */
- @XmlAttribute
- public String getListenerPort() {
- return listenerPort;
- }
-
- /**
- * @return the listener port range
- */
- @XmlAttribute
- public String getListenerPortRange() {
- return listenerPortRange;
- }
-
- /**
- * @return the start time
- */
- @XmlAttribute
- public String getStartTimestamp() {
- return startTimestamp;
- }
-
- /**
- * Add a DcsServer to the list
- *
- * @param znode
- * the znode name
- */
- public DcsServer addDcsServer(String znode, String data) {
- Scanner scn = new Scanner(znode);
- scn.useDelimiter(":");
- String hostName = scn.next();// host name
- String instance = scn.next();// instance
- String infoPort = scn.next();// info port
- String startTimestamp = scn.next();
- scn.close();
- ServerModel.DcsServer dcsServer = new ServerModel.DcsServer(
- hostName, instance, infoPort, startTimestamp);
- dcsServerList.add(dcsServer);
- return dcsServer;
- }
-
- /**
- * @param index
- * the index
- * @return the DcsServer name
- */
- public DcsServer getDcsServer(int index) {
- return dcsServerList.get(index);
- }
-
- /**
- * @return the list of DcsServer
- */
- @XmlElement(name = "DcsServer")
- public List<DcsServer> getDcsServer() {
- return dcsServerList;
- }
- }
-
- /**
- * Represents a DcsServer server.
- */
- public static class DcsServer {
- // from znode, no data
- private String hostName;
- private String instance;
- private String infoPort;
- private String startTimestamp;
- private List<TrafodionServer> trafServerList = new ArrayList<TrafodionServer>();
-
- /**
- * Default constructor
- */
- public DcsServer() {
- }
-
- /**
- * Constructor
- *
- * @param hostName
- * the host name
- * @param instance
- * the instance number
- * @param infoPort
- * the port
- * @param startTimestamp
- * the start timestamp
- */
- public DcsServer(String hostName, String instance, String infoPort,
- String startTimestamp) {
- this.hostName = hostName;
- this.instance = instance;
- this.infoPort = infoPort;
- this.startTimestamp = startTimestamp;
- }
-
- /**
- * @return the host name
- */
- @XmlAttribute
- public String getHostName() {
- return hostName;
- }
-
- /**
- * @return the instance number
- */
- @XmlAttribute
- public String getInstance() {
- return instance;
- }
-
- /**
- * @return the listener port range
- */
- @XmlAttribute
- public String getInfoPort() {
- return infoPort;
- }
-
- /**
- * @return the start timestamp
- */
- @XmlAttribute
- public String getStartTimestamp() {
- return startTimestamp;
- }
-
- /**
- * Add a TrafodionServer to the list
- *
- * @param znode
- * the znode name
- * @param data
- * the data
- */
- public void addTrafodionServer(String znode, String data) {
- Scanner scn = new Scanner(znode);
- scn.useDelimiter(":");
- String hostName = scn.next();// host name
- String instance = scn.next();// DcsServer's instance ID
- String trafInstance = scn.next();// Traf server's instance ID
- scn.close();
- scn = new Scanner(data);
- scn.useDelimiter(":");
- String state = scn.next();// state
- String timestamp = scn.next();// last updated timestamp
- String dialogueId = scn.next();// dialogue id
- String nid = scn.next();// node id
- String pid = scn.next();// process id
- String processName = scn.next();// process name
- String ipAddress = scn.next();// server ip address
- String port = scn.next();// server port
- String clientHostName = scn.next();// client host name
- String clientIpAddress = scn.next();// client ip address
- String clientPort = scn.next();// client port
- String clientAppl = scn.next();// client application name
- scn.close();
-
- if (this.hostName.equalsIgnoreCase(hostName)
- && this.instance.equalsIgnoreCase(instance))
- trafServerList.add(new ServerModel.TrafodionServer(hostName,
- instance, trafInstance, state, timestamp, dialogueId,
- nid, pid, processName, ipAddress, port, clientHostName,
- clientIpAddress, clientPort, clientAppl));
- }
-
- /**
- * @param index
- * the index
- * @return the TrafodionServer
- */
- public TrafodionServer getTrafodionServer(int index) {
- return trafServerList.get(index);
- }
-
- /**
- * @return the list of Trafodion servers
- */
- @XmlElement(name = "TrafodionServer")
- public List<TrafodionServer> getTrafodionServer() {
- return trafServerList;
- }
- }
-
- /**
- * Represents a TrafodionServer server.
- */
- public static class TrafodionServer {
- // from znode
- private String hostName;
- private String dcsInstance;
- private String instance;
- // from data
- private String state;
- private String timestamp;
- private String dialogueId;
- private String nid;
- private String pid;
- private String processName;
- private String ipAddress;
- private String port;
- private String clientHostName;
- private String clientIpAddress;
- private String clientPort;
- private String clientAppl;
-
- /**
- * Default constructor
- */
- public TrafodionServer() {
- }
-
- /**
- * Constructor
- *
- * @param hostName
- * the host name
- */
- public TrafodionServer(String hostName, String dcsInstance,
- String instance, String state, String timestamp,
- String dialogueId, String nid, String pid, String processName,
- String ipAddress, String port, String clientHostName,
- String clientIpAddress, String clientPort, String clientAppl) {
- this.hostName = hostName;
- this.dcsInstance = dcsInstance;
- this.instance = instance;
- this.state = state;
- this.timestamp = timestamp;
- this.dialogueId = dialogueId;
- this.nid = nid;
- this.pid = pid;
- this.processName = processName;
- this.ipAddress = ipAddress;
- this.port = port;
- this.clientHostName = clientHostName;
- this.clientIpAddress = clientIpAddress;
- this.clientPort = clientPort;
- this.clientAppl = clientAppl;
- }
-
- /**
- * @return the server's host name
- */
- @XmlAttribute
- public String getHostName() {
- return hostName;
- }
-
- /**
- * @return the DCS server's instance ID
- */
- @XmlAttribute
- public String getDcsInstance() {
- return dcsInstance;
- }
-
- /**
- * @return the Trafodion server's instance number
- */
- @XmlAttribute
- public String getInstance() {
- return instance;
- }
-
- /**
- * @return the server state
- */
- @XmlAttribute
- public String getState() {
- return state;
- }
-
- /**
- * @return the server timestamp
- */
- @XmlAttribute
- public String getTimestamp() {
- return timestamp;
- }
-
- /**
- * @return the dialogueId
- */
- @XmlAttribute
- public String getDialogueId() {
- return dialogueId;
- }
-
- /**
- * @return the node Id
- */
- @XmlAttribute
- public String getNid() {
- return nid;
- }
-
- /**
- * @return the process Id
- */
- @XmlAttribute
- public String getPid() {
- return pid;
- }
-
- /**
- * @return the process name
- */
- @XmlAttribute
- public String getProcessName() {
- return processName;
- }
-
- /**
- * @return the server's IP address
- */
- @XmlAttribute
- public String getIpAddress() {
- return ipAddress;
- }
-
- /**
- * @return the server's port number
- */
- @XmlAttribute
- public String getPort() {
- return port;
- }
-
- /**
- * @return the connected client's host name
- */
- @XmlAttribute
- public String getClientHostName() {
- return clientHostName;
- }
-
- /**
- * @return the the connected client's IP address
- */
- @XmlAttribute
- public String getClientIpAddress() {
- return clientIpAddress;
- }
-
- /**
- * @return the connected client's port number
- */
- @XmlAttribute
- public String getClientPort() {
- return clientPort;
- }
-
- /**
- * @return the connected client's application name
- */
- @XmlAttribute
- public String getClientAppl() {
- return clientAppl;
- }
- }
-
- /**
- * Default constructor
- */
- public ServerModel() {
- }
-
- private DcsMaster dcsMaster = null;
-
- /**
- * Add a DcsMaster
- *
- * @param znode
- * the znode
- */
- public DcsMaster addDcsMaster(String znode, String data) {
- Scanner scn = new Scanner(znode);
- scn.useDelimiter(":");
- String hostName = scn.next();// host name
- String listenerPort = scn.next();// listener port
- String listenerPortRange = scn.next();
- String startTimestamp = scn.next();
- scn.close();
- dcsMaster = new ServerModel.DcsMaster(hostName, listenerPort,
- listenerPortRange, startTimestamp);
- return dcsMaster;
- }
-
- /**
- * @return the DCS Master server
- */
- @XmlElement(name = "DcsMaster")
- public DcsMaster getDcsMaster() {
- return dcsMaster;
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- /*
- * if (!dcsMaster.isEmpty()) { //sb.append(String.format(
- * "%d DcsMaster server(s), %d DcsServer server(s)\n\n"
- * ,dcsMaster.size(), dcsMaster.getDcsServer().size());
- * //sb.append(liveNodes.size()); //sb.append(" live servers\n"); for
- * (DcsMaster aServer: dcsMaster) { sb.append(" ");
- * sb.append(node.name); sb.append(' '); sb.append(node.startCode);
- * sb.append("\n requests="); sb.append(node.requests);
- * sb.append(", regions="); sb.append(node.regions.size());
- * sb.append("\n heapSizeMB="); sb.append(node.heapSizeMB);
- * sb.append("\n maxHeapSizeMB="); sb.append(node.maxHeapSizeMB);
- * sb.append("\n\n"); for (Node.Region region: node.regions) {
- * sb.append(" "); sb.append(Bytes.toString(region.name));
- * sb.append("\n stores="); sb.append(region.stores);
- * sb.append("\n storefiless=");
- * sb.append(region.storefiles);
- * sb.append("\n storefileSizeMB=");
- * sb.append(region.storefileSizeMB);
- * sb.append("\n memstoreSizeMB=");
- * sb.append(region.memstoreSizeMB);
- * sb.append("\n storefileIndexSizeMB=");
- * sb.append(region.storefileIndexSizeMB);
- * sb.append("\n readRequestsCount=");
- * sb.append(region.readRequestsCount);
- * sb.append("\n writeRequestsCount=");
- * sb.append(region.writeRequestsCount);
- * sb.append("\n rootIndexSizeKB=");
- * sb.append(region.rootIndexSizeKB);
- * sb.append("\n totalStaticIndexSizeKB=");
- * sb.append(region.totalStaticIndexSizeKB);
- * sb.append("\n totalStaticBloomSizeKB=");
- * sb.append(region.totalStaticBloomSizeKB);
- * sb.append("\n totalCompactingKVs=");
- * sb.append(region.totalCompactingKVs);
- * sb.append("\n currentCompactedKVs=");
- * sb.append(region.currentCompactedKVs); sb.append('\n'); }
- * sb.append('\n'); } }
- */
- return sb.toString();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/java/org/trafodion/dcs/rest/model/VersionModel.java
----------------------------------------------------------------------
diff --git a/dcs/src/main/java/org/trafodion/dcs/rest/model/VersionModel.java b/dcs/src/main/java/org/trafodion/dcs/rest/model/VersionModel.java
deleted file mode 100644
index 3d3bebe..0000000
--- a/dcs/src/main/java/org/trafodion/dcs/rest/model/VersionModel.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/**
-* @@@ START COPYRIGHT @@@
-
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
-
-* @@@ END COPYRIGHT @@@
- */
-/**
- * Copyright 2007 The Apache Software Foundation
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.trafodion.dcs.rest.model;
-
-import java.io.IOException;
-import java.io.Serializable;
-
-import javax.servlet.ServletContext;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.trafodion.dcs.rest.RESTServlet;
-
-import com.sun.jersey.spi.container.servlet.ServletContainer;
-
-/**
- * A representation of the collection of versions of the REST gateway software
- * components.
- * <ul>
- * <li>restVersion: REST gateway revision</li>
- * <li>jvmVersion: the JVM vendor and version information</li>
- * <li>osVersion: the OS type, version, and hardware architecture</li>
- * <li>serverVersion: the name and version of the servlet container</li>
- * <li>jerseyVersion: the version of the embedded Jersey framework</li>
- * </ul>
- */
-@XmlRootElement(name="Version")
-public class VersionModel implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- private String restVersion;
- private String jvmVersion;
- private String osVersion;
- private String serverVersion;
- private String jerseyVersion;
-
- /**
- * Default constructor. Do not use.
- */
- public VersionModel() {}
-
- /**
- * Constructor
- * @param context the servlet context
- */
- public VersionModel(ServletContext context) {
- restVersion = RESTServlet.VERSION_STRING;
- jvmVersion = System.getProperty("java.vm.vendor") + ' ' +
- System.getProperty("java.version") + '-' +
- System.getProperty("java.vm.version");
- osVersion = System.getProperty("os.name") + ' ' +
- System.getProperty("os.version") + ' ' +
- System.getProperty("os.arch");
- serverVersion = context.getServerInfo();
- jerseyVersion = ServletContainer.class.getPackage()
- .getImplementationVersion();
- }
-
- /**
- * @return the REST gateway version
- */
- @XmlAttribute(name="REST")
- public String getRESTVersion() {
- return restVersion;
- }
-
- /**
- * @return the JVM vendor and version
- */
- @XmlAttribute(name="JVM")
- public String getJVMVersion() {
- return jvmVersion;
- }
-
- /**
- * @return the OS name, version, and hardware architecture
- */
- @XmlAttribute(name="OS")
- public String getOSVersion() {
- return osVersion;
- }
-
- /**
- * @return the servlet container version
- */
- @XmlAttribute(name="Server")
- public String getServerVersion() {
- return serverVersion;
- }
-
- /**
- * @return the version of the embedded Jersey framework
- */
- @XmlAttribute(name="Jersey")
- public String getJerseyVersion() {
- return jerseyVersion;
- }
-
- /**
- * @param version the REST gateway version string
- */
- public void setRESTVersion(String version) {
- this.restVersion = version;
- }
-
- /**
- * @param version the OS version string
- */
- public void setOSVersion(String version) {
- this.osVersion = version;
- }
-
- /**
- * @param version the JVM version string
- */
- public void setJVMVersion(String version) {
- this.jvmVersion = version;
- }
-
- /**
- * @param version the servlet container version string
- */
- public void setServerVersion(String version) {
- this.serverVersion = version;
- }
-
- /**
- * @param version the Jersey framework version string
- */
- public void setJerseyVersion(String version) {
- this.jerseyVersion = version;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("rest ");
- sb.append(restVersion);
- sb.append(" [JVM: ");
- sb.append(jvmVersion);
- sb.append("] [OS: ");
- sb.append(osVersion);
- sb.append("] [Server: ");
- sb.append(serverVersion);
- sb.append("] [Jersey: ");
- sb.append(jerseyVersion);
- sb.append("]\n");
- return sb.toString();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/java/org/trafodion/dcs/rest/model/WorkloadListModel.java
----------------------------------------------------------------------
diff --git a/dcs/src/main/java/org/trafodion/dcs/rest/model/WorkloadListModel.java b/dcs/src/main/java/org/trafodion/dcs/rest/model/WorkloadListModel.java
deleted file mode 100644
index 9aecf14..0000000
--- a/dcs/src/main/java/org/trafodion/dcs/rest/model/WorkloadListModel.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/**********************************************************************
-* @@@ START COPYRIGHT @@@
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-* @@@ END COPYRIGHT @@@
-**********************************************************************/
-package org.trafodion.dcs.rest.model;
-
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.hadoop.conf.Configuration;
-import org.trafodion.dcs.util.DcsConfiguration;
-import org.trafodion.dcs.Constants;
-
-import javax.xml.bind.annotation.XmlElementRef;
-import javax.xml.bind.annotation.XmlRootElement;
-
-/**
-* @@@ START COPYRIGHT @@@
-
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
-
-* @@@ END COPYRIGHT @@@
- */
-@XmlRootElement(name="Workloads")
-public class WorkloadListModel {
- private static final long serialVersionUID = 1L;
- private List<WorkloadModel> workloads = new ArrayList<WorkloadModel>();
- private static int refreshSeconds;
- /**
- * Default constructor
- */
- public WorkloadListModel() {
- Configuration conf = DcsConfiguration.create();
- refreshSeconds = conf.getInt("dcs.rest.refresh.seconds",5);
- }
-
- /**
- * Add the workload to the list
- * @param workload the workload model
- */
- public void add(WorkloadModel workload) {
- workloads.add(workload);
- }
-
- /**
- * @param index the index
- * @return the workload model
- */
- public WorkloadModel get(int index) {
- return workloads.get(index);
- }
-
- /**
- * @return the workloads
- */
- public List<WorkloadModel> getWorkloads() {
- return workloads;
- }
-
- /**
- * @param workloads the list of workloads
- */
- public void setWorkloads(List<WorkloadModel> workloads) {
- this.workloads = workloads;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- /*
- sb.append("<html>\n");
- sb.append("<head>\n");
- sb.append("<title>DCS (Data Connectivity Services)</title>\n");
- if(refreshSeconds > 0)
- sb.append("<meta http-equiv=\"refresh\" content=\"5\">\n");
- sb.append("</head>\n");
- sb.append("<body>\n");
- //
- sb.append("<table border=\"1\">\n");
- sb.append("<tr>\n");
- sb.append("<th>Type</th>\n");
- sb.append("<th>Znode</th>\n");
- sb.append("<th>Data</th>\n");
- sb.append("</tr>\n");
-
- for(WorkloadModel aWorkload : workloads) {
- sb.append(aWorkload.toString());
- sb.append('\n');
- }
-
- sb.append("</table>\n");
- sb.append("</body>\n");
- sb.append("</html>\n");
- */
-
-
- sb.append("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n");
- sb.append("<html>\n");
- sb.append("<head>\n");
- sb.append("<meta http-equiv=\"Content-Type\" content=\"text/html\"; charset=ISO-8859-1\">\n");
- sb.append("<title>(DCS) Data Connectivity Services</title>\n");
- sb.append("<style type=\"text/css\">\n");
- sb.append(" * { padding: 0; margin: 0; }\n");
- sb.append(" table.dcs {\n");
- sb.append(" font-family: verdana, arial, helvetica, sans-serif;\n");
- sb.append(" font-size: 11px;\n");
- sb.append(" cellspacing: 0;\n");
- sb.append(" border-collapse: collapse;\n");
- sb.append(" width: 535px;\n");
- sb.append(" }\n");
- sb.append(" table.dcs td {\n");
- sb.append(" border-left: 1px solid #999;\n");
- sb.append(" border-top: 1px solid #999;\n");
- sb.append(" padding: 2px 4px;\n");
- sb.append(" }\n");
- sb.append(" table.dcs tr:first-child td {\n");
- sb.append(" border-top: none;\n");
- sb.append(" }\n");
- sb.append(" table.dcs th { \n");
- sb.append(" border-left: 1px solid #999;\n");
- sb.append(" padding: 2px 4px;\n");
- sb.append(" background: #6b6164;\n");
- sb.append(" color: white;\n");
- sb.append(" font-variant: small-caps;\n");
- sb.append(" }\n");
- sb.append(" table.dcs td { background: #eee; overflow: hidden; }\n");
-
- sb.append(" div.scrollableContainer {\n");
- sb.append(" position: relative;\n");
- sb.append(" width: 750px;\n");
- sb.append(" padding-top: 2em;\n");
- sb.append(" margin: 40px;\n");
- sb.append(" border: 1px solid #999;\n");
- sb.append(" background: #6b6164;\n");
- sb.append(" }\n");
- sb.append(" div.scrollingArea {\n");
- sb.append(" height: 240px;\n");
- sb.append(" overflow: auto;\n");
- sb.append(" }\n");
-
- sb.append(" table.scrollable thead tr {\n");
- sb.append(" left: -1px; top: 0;\n");
- sb.append(" position: absolute;\n");
- sb.append(" }\n");
-
- sb.append(" table.dcs .type div { width: 100px; }\n");
- sb.append(" table.dcs .znode div { width: 100px; }\n");
- sb.append(" table.dcs .data div { width: 100px; }\n");
-
- sb.append("</style>\n");
- sb.append("</head>\n");
- sb.append("<body>\n");
-
- sb.append("<div class=\"scrollableContainer\">\n");
- sb.append("<div class=\"scrollingArea\">\n");
- sb.append("<table class=\"dcs scrollable\">\n");
- sb.append("<thead>\n");
- sb.append("<tr>\n");
- sb.append("<th><div class=\"type\">Type</div></th>\n");
- sb.append("<th><div class=\"znode\">Znode</div></th>\n");
- sb.append("<th><div class=\"data\">Data</div></th>\n");
- sb.append("</tr>\n");
- sb.append("</thead>\n");
- sb.append("<tbody>\n");
-
- for(WorkloadModel aWorkload : workloads) {
- sb.append("<tr>\n");
- sb.append(aWorkload.toString());
- sb.append("</tr>\n");
- }
-
- sb.append("</tbody>\n");
- sb.append("</table>\n");
- sb.append("</div>\n");
- sb.append("</div>\n");
- sb.append("<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js\"></script>\n");
- sb.append("<script type=\"text/javascript\">\n");
- sb.append("$(document).ready(function() {\n");
- sb.append("$(\".scrollingArea\").height( $(window).height()-100 );\n");
- sb.append("$(window).resize(function() { $(\".scrollingArea\").height( $(window).height()-100 ); } );\n");
- sb.append("});\n");
- sb.append("</script>\n");
- sb.append("</body>\n");
- sb.append("</html>\n");
- return sb.toString();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/java/org/trafodion/dcs/rest/model/WorkloadModel.java
----------------------------------------------------------------------
diff --git a/dcs/src/main/java/org/trafodion/dcs/rest/model/WorkloadModel.java b/dcs/src/main/java/org/trafodion/dcs/rest/model/WorkloadModel.java
deleted file mode 100644
index 1f67edc..0000000
--- a/dcs/src/main/java/org/trafodion/dcs/rest/model/WorkloadModel.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**********************************************************************
-* @@@ START COPYRIGHT @@@
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-* @@@ END COPYRIGHT @@@
-**********************************************************************/
-package org.trafodion.dcs.rest.model;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.text.DateFormat;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-
-/**
-* @@@ START COPYRIGHT @@@
-
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
-
-* @@@ END COPYRIGHT @@@
- */
-@XmlRootElement(name="workload")
-public class WorkloadModel implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private String type;
- private String znode;
- private String data;
-
- /**
- * Default constructor
- */
- public WorkloadModel() {}
-
- /**
- * Constructor
- * @param type
- * @param znode
- * @param data
- */
- public WorkloadModel(String type,String znode,String data) {
- super();
- this.type = type;
- this.znode = znode;
- this.data = data;
- }
-
- /**
- * @return the type
- */
- @XmlAttribute
- public String getType() {
- return type;
- }
-
- /**
- * @param value the type to set
- */
- public void setType(String value) {
- this.type = value;
- }
-
- /**
- * @return the znode
- */
- @XmlAttribute
- public String getZnode() {
- return znode;
- }
-
- /**
- * @param value the znode to set
- */
- public void setZnode(String value) {
- this.znode = value;
- }
-
- /**
- * @return the data
- */
- @XmlAttribute
- public String getData() {
- return data;
- }
-
- /**
- * @param value the value to set
- */
- public void setData(String value) {
- this.data = value;
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- /*
- sb.append("<td>" + type + "</td>\n");
- sb.append("<td>" + znode + "</td>\n");
- sb.append("<td>" + data + "</td>\n");
- sb.append("</tr>\n");
- */
- sb.append("<td><div class=\"type\">" + type + "</div></td>\n");
- sb.append("<td><div class=\"znode\">" + znode + "</div></td>\n");
- sb.append("<td><div class=\"data\">" + data + "</div></td>\n");
- return sb.toString();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/java/org/trafodion/dcs/rest/provider/JAXBContextResolver.java
----------------------------------------------------------------------
diff --git a/dcs/src/main/java/org/trafodion/dcs/rest/provider/JAXBContextResolver.java b/dcs/src/main/java/org/trafodion/dcs/rest/provider/JAXBContextResolver.java
deleted file mode 100644
index aa3b965..0000000
--- a/dcs/src/main/java/org/trafodion/dcs/rest/provider/JAXBContextResolver.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/**********************************************************************
-* @@@ START COPYRIGHT @@@
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-* @@@ END COPYRIGHT @@@
-**********************************************************************/
-package org.trafodion.dcs.rest.provider;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.ws.rs.ext.ContextResolver;
-import javax.ws.rs.ext.Provider;
-import javax.xml.bind.JAXBContext;
-
-import org.trafodion.dcs.rest.model.ServerModel;
-import org.trafodion.dcs.rest.model.VersionModel;
-
-import com.sun.jersey.api.json.JSONConfiguration;
-import com.sun.jersey.api.json.JSONJAXBContext;
-
-/**
-* @@@ START COPYRIGHT @@@
-
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
-
-* @@@ END COPYRIGHT @@@
- */
-@Provider
-public class JAXBContextResolver implements ContextResolver<JAXBContext> {
-
- private final JAXBContext context;
-
- private final Set<Class<?>> types;
-
- private final Class<?>[] cTypes = {
- ServerModel.class,
- VersionModel.class
- };
-
- @SuppressWarnings("unchecked")
- public JAXBContextResolver() throws Exception {
- this.types = new HashSet<Class<?>>(Arrays.asList(cTypes));
- this.context = new JSONJAXBContext(JSONConfiguration.natural().build(),
- cTypes);
- }
-
- @Override
- public JAXBContext getContext(Class<?> objectType) {
- return (types.contains(objectType)) ? context : null;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/java/org/trafodion/dcs/rest/provider/producer/PlainTextMessageBodyProducer.java
----------------------------------------------------------------------
diff --git a/dcs/src/main/java/org/trafodion/dcs/rest/provider/producer/PlainTextMessageBodyProducer.java b/dcs/src/main/java/org/trafodion/dcs/rest/provider/producer/PlainTextMessageBodyProducer.java
deleted file mode 100644
index 5cf1431..0000000
--- a/dcs/src/main/java/org/trafodion/dcs/rest/provider/producer/PlainTextMessageBodyProducer.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/**********************************************************************
-* @@@ START COPYRIGHT @@@
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-* @@@ END COPYRIGHT @@@
-**********************************************************************/
-
-package org.trafodion.dcs.rest.provider.producer;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-
-import javax.ws.rs.Produces;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.MultivaluedMap;
-import javax.ws.rs.ext.MessageBodyWriter;
-import javax.ws.rs.ext.Provider;
-
-import org.trafodion.dcs.rest.RestConstants;
-
-/**
-* @@@ START COPYRIGHT @@@
-
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
-
-* @@@ END COPYRIGHT @@@
- */
-@Provider
-@Produces(RestConstants.MIMETYPE_TEXT)
-public class PlainTextMessageBodyProducer
- implements MessageBodyWriter<Object> {
-
- private ThreadLocal<byte[]> buffer = new ThreadLocal<byte[]>();
-
- @Override
- public boolean isWriteable(Class<?> arg0, Type arg1, Annotation[] arg2,
- MediaType arg3) {
- return true;
- }
-
- @Override
- public long getSize(Object object, Class<?> type, Type genericType,
- Annotation[] annotations, MediaType mediaType) {
- byte[] bytes = object.toString().getBytes();
- buffer.set(bytes);
- return bytes.length;
- }
-
- @Override
- public void writeTo(Object object, Class<?> type, Type genericType,
- Annotation[] annotations, MediaType mediaType,
- MultivaluedMap<String, Object> httpHeaders, OutputStream outStream)
- throws IOException, WebApplicationException {
- byte[] bytes = buffer.get();
- outStream.write(bytes);
- buffer.remove();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/resources/dcs-webapps/master/aggr_querystats.html
----------------------------------------------------------------------
diff --git a/dcs/src/main/resources/dcs-webapps/master/aggr_querystats.html b/dcs/src/main/resources/dcs-webapps/master/aggr_querystats.html
deleted file mode 100644
index 76545ae..0000000
--- a/dcs/src/main/resources/dcs-webapps/master/aggr_querystats.html
+++ /dev/null
@@ -1,88 +0,0 @@
-<!-- @@@ START COPYRIGHT @@@ -->
-<!--
-<!-- Licensed to the Apache Software Foundation (ASF) under one
-<!-- or more contributor license agreements. See the NOTICE file
-<!-- distributed with this work for additional information
-<!-- regarding copyright ownership. The ASF licenses this file
-<!-- to you under the Apache License, Version 2.0 (the
-<!-- "License"); you may not use this file except in compliance
-<!-- with the License. You may obtain a copy of the License at
-<!--
-<!-- http://www.apache.org/licenses/LICENSE-2.0
-<!--
-<!-- Unless required by applicable law or agreed to in writing,
-<!-- software distributed under the License is distributed on an
-<!-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-<!-- KIND, either express or implied. See the License for the
-<!-- specific language governing permissions and limitations
-<!-- under the License.
-<!--
-<!-- @@@ END COPYRIGHT @@@ -->
-<head>
- <link type="text/css" href="datatables/css/jquery.dataTables_themeroller.css" rel="stylesheet" />
- <link type="text/css" href="datatables/css/demo_page.css" rel="stylesheet" />
- <link type="text/css" href="datatables/css/demo_table_jui.css" rel="stylesheet" />
- <link type="text/css" href="jquery-ui/jquery-ui.css" rel="stylesheet" />
- <script type="text/javascript" src="js/lib/jquery-1.11.0.js"></script>
- <script type="text/javascript" src="datatables/js/jquery.dataTables.js"></script>
-
-</head>
-
- <div id="progress">
- <p><span style="font-family: Georgia, 'Times New Roman', Times, serif; font-size: 18px;">Fetching repository data ...</p>
- <img src="img/ajax-loader.gif"/>
- </div>
- <div id="aggr-query-stats"></div>
-
-<script type="text/javascript">
-$(document).ready(function(){
- document.body.style.cursor = 'wait';
- $('#aggr-query-stats').html('').css('color','black');
- var jqxhr = $.getJSON('aggr_querystats.jsp',function(result){
-
- var keys;
- $.each(result, function(i, data){
- keys = Object.keys(data);
- });
-
- var sb = '<table class="display1" id="aggr-query-stats-table" style="font-size:small"><thead><tr>';
- for (var r=0,len=keys.length; r<len; r++) {
- sb += '<th><b></b>' + keys[r] + '</th>';
- }
- sb += '</tr></thead><tbody> </tbody></table>';
- $('#aggr-query-stats').html( sb );
-
- var aoColumns = [];
- var aaData = [];
-
- $.each(result, function(i, data){
- var rowData = [];
- $.each(keys, function(k, v) {
- rowData.push(data[v]);
- });
- aaData.push(rowData);
- });
-
- // add needed columns
- $.each(keys, function(k, v) {
- obj = new Object();
- obj.sTitle = v;
- aoColumns.push(obj);
- });
-
- $('#aggr-query-stats-table').dataTable({"bProcessing": true,"bJQueryUI": true,"sPaginationType": "full_numbers","aaData": aaData, "aoColumns" : aoColumns });
-
- var elem = document.getElementById('progress');
- elem.parentNode.removeChild(elem);
- document.body.style.cursor = 'default';
-
- });
-
- jqxhr.fail(function(){
- $('#aggr-query-stats').html( jqxhr.responseText ).css('color','red');
- var elem = document.getElementById('progress');
- elem.parentNode.removeChild(elem);
- document.body.style.cursor = 'default';
- });
- });
-</script>
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/resources/dcs-webapps/master/aggr_querystats.jsp
----------------------------------------------------------------------
diff --git a/dcs/src/main/resources/dcs-webapps/master/aggr_querystats.jsp b/dcs/src/main/resources/dcs-webapps/master/aggr_querystats.jsp
deleted file mode 100644
index ff80698..0000000
--- a/dcs/src/main/resources/dcs-webapps/master/aggr_querystats.jsp
+++ /dev/null
@@ -1,85 +0,0 @@
-<%--
-/**
- * @@@ START COPYRIGHT @@@
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- * @@@ END COPYRIGHT @@@
- */
---%>
-<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
-<%@ page contentType="text/html;charset=UTF-8"
- import="java.io.*"
- import="java.util.*"
- import="java.sql.*"
- import="org.apache.hadoop.conf.Configuration"
- import="org.trafodion.dcs.master.DcsMaster"
- import="org.trafodion.dcs.util.DcsConfiguration"
- import="org.trafodion.dcs.Constants"
- import="org.trafodion.dcs.util.Bytes"
- import="org.trafodion.dcs.util.JdbcT4Util"
- import="org.codehaus.jettison.json.JSONArray"
- import="org.codehaus.jettison.json.JSONException"
- import="org.codehaus.jettison.json.JSONObject"
- %>
-<%
- java.sql.Connection connection = null;
- java.sql.Statement stmt = null;
- java.sql.ResultSet rs = null;
-
- try {
- DcsMaster master = (DcsMaster)getServletContext().getAttribute(DcsMaster.MASTER);
- Configuration conf = master.getConfiguration();
- boolean readOnly = conf.getBoolean("dcs.master.ui.readonly", false);
- String masterServerName = master.getServerName();
- int masterInfoPort = master.getInfoPort();
- String trafodionHome = master.getTrafodionHome();
- boolean trafodionLogs = conf.getBoolean(Constants.DCS_MASTER_TRAFODION_LOGS, Constants.DEFAULT_DCS_MASTER_TRAFODION_LOGS);
- String queryText = conf.get(Constants.TRAFODION_REPOS_METRIC_QUERY_AGGR_TABLE_QUERY,Constants.DEFAULT_TRAFODION_REPOS_METRIC_QUERY_AGGR_TABLE_QUERY);
- JSONArray metricQueryAggrJson = null;
- JdbcT4Util jdbcT4Util = master.getServerManager().getJdbcT4Util();
- connection = jdbcT4Util.getConnection();
- stmt = connection.createStatement();
- rs = stmt.executeQuery(queryText);
- metricQueryAggrJson = jdbcT4Util.convertResultSetToJSON(rs);
- response.setContentType("application/json");
- response.getWriter().print(metricQueryAggrJson);
- } catch (SQLException e) {
- SQLException nextException = e;
- StringBuilder sb = new StringBuilder();
- do {
- sb.append(nextException.getMessage());
- sb.append("\nSQLState " + nextException.getSQLState());
- sb.append("\nError Code " + nextException.getErrorCode());
- } while ((nextException = nextException.getNextException()) != null);
- response.setContentType("text/plain");
- response.setStatus(response.SC_INTERNAL_SERVER_ERROR);
- response.getWriter().print(sb.toString());
- } catch (Exception e) {
- response.setContentType("text/plain");
- response.setStatus(response.SC_INTERNAL_SERVER_ERROR);
- response.getWriter().print(e.getMessage());
- } finally {
- if (rs != null)
- rs.close();
- if (stmt != null)
- stmt.close();
- if (connection != null)
- connection.close();
- }
-%>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/resources/dcs-webapps/master/explain.html
----------------------------------------------------------------------
diff --git a/dcs/src/main/resources/dcs-webapps/master/explain.html b/dcs/src/main/resources/dcs-webapps/master/explain.html
deleted file mode 100644
index d8ddd12..0000000
--- a/dcs/src/main/resources/dcs-webapps/master/explain.html
+++ /dev/null
@@ -1,62 +0,0 @@
-<!-- @@@ START COPYRIGHT @@@ -->
-<!--
-<!-- Licensed to the Apache Software Foundation (ASF) under one
-<!-- or more contributor license agreements. See the NOTICE file
-<!-- distributed with this work for additional information
-<!-- regarding copyright ownership. The ASF licenses this file
-<!-- to you under the Apache License, Version 2.0 (the
-<!-- "License"); you may not use this file except in compliance
-<!-- with the License. You may obtain a copy of the License at
-<!--
-<!-- http://www.apache.org/licenses/LICENSE-2.0
-<!--
-<!-- Unless required by applicable law or agreed to in writing,
-<!-- software distributed under the License is distributed on an
-<!-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-<!-- KIND, either express or implied. See the License for the
-<!-- specific language governing permissions and limitations
-<!-- under the License.
-<!--
-<!-- @@@ END COPYRIGHT @@@ -->
-
-<head>
- <link type="text/css" href="css/base.css" rel="stylesheet" />
- <link type="text/css" href="css/Spacetree.css" rel="stylesheet" />
- <link type="text/css" href="datatables/css/jquery.dataTables_themeroller.css" rel="stylesheet" />
- <link type="text/css" href="datatables/css/demo_page.css" rel="stylesheet" />
- <link type="text/css" href="datatables/css/demo_table_jui.css" rel="stylesheet" />
- <link type="text/css" href="jquery-ui/jquery-ui.css" rel="stylesheet" />
- <script type="text/javascript" src="js/lib/jquery-1.11.0.js"></script>
- <script type="text/javascript" src="jquery-ui/jquery-ui.js"></script>
- <script type="text/javascript" src="datatables/js/jquery.dataTables.js"></script>
- <script type="text/javascript" src="js/lib/jit.js"></script>
- <script type="text/javascript" src="js/ExplainPlanView.js"></script>
-</head>
-<div id="hpdsm-workload-summary-page" class="hp-page">
- <h1>Query</h1>
- <div id="hpdsm-whiteboard-query" class="hp-panel-contents">
- <textarea id="query-text" class="hpdsm-whiteboard-query-area" name="TextMessage" spellcheck="false" placeholder="Enter a SQL query..." rows="5" style="width: 95%;color:black;font-size:14px;"></textarea>
- <br>
- <button id="explainQuery" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button"><span class="ui-button-text">Explain</span></button>
- <button id="executeQuery" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button"><span class="ui-button-text">Execute</span></button>
- <button id="setControlStmts" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button"><span class="ui-button-text">Options</span></button>
- </div>
- <br/>
- <h1>Result</h1>
- <img id="loadingImg" src="img/ajax-loader.gif"/>
- <div id="hpdsm-1">
- <div id="query-result-container" dtName=''></div>
- <div id="infovis"></div>
- <label id="errorText" style="color:red"></label>
- </div>
-
-</div>
-<div id="dialog-form" title="Control Options" style="display:none; height:500px;width:100%">
- <form onsubmit="return false">
- <label for="controlStmts">Control Statements : </label>
- <textarea id="controlStmts" rows="9" cols="450" placeholder="control statements separated by semi-colon" style="width:450px"/>
-
- <!-- Allow form submission with keyboard without duplicating the dialog button -->
- <input type="submit" tabindex="-1" style="position:absolute; top:-1000px">
- </form>
-</div>
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/resources/dcs-webapps/master/queryPlan.jsp
----------------------------------------------------------------------
diff --git a/dcs/src/main/resources/dcs-webapps/master/queryPlan.jsp b/dcs/src/main/resources/dcs-webapps/master/queryPlan.jsp
deleted file mode 100644
index 51f74ce..0000000
--- a/dcs/src/main/resources/dcs-webapps/master/queryPlan.jsp
+++ /dev/null
@@ -1,77 +0,0 @@
-<%--
-/**
- * @@@ START COPYRIGHT @@@
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- * @@@ END COPYRIGHT @@@
- */
---%>
-<%@ page contentType="text/html;charset=UTF-8"
- import="java.io.*"
- import="java.util.*"
- import="org.apache.hadoop.conf.Configuration"
- import="org.trafodion.dcs.master.DcsMaster"
- import="org.trafodion.dcs.util.DcsConfiguration"
- import="org.trafodion.dcs.Constants"
- import="org.trafodion.dcs.util.Bytes"
- import="org.codehaus.jettison.json.JSONArray"
- import="org.codehaus.jettison.json.JSONException"
- import="org.codehaus.jettison.json.JSONObject"
- import="org.trafodion.dcs.master.QueryPlanModel"
- import="org.trafodion.dcs.master.QueryPlanResponse"
- import="org.codehaus.jackson.JsonGenerationException"
- import="org.codehaus.jackson.map.JsonMappingException"
- import="org.codehaus.jackson.map.ObjectMapper"
- %>
-<%
- try {
- DcsMaster master = (DcsMaster)getServletContext().getAttribute(DcsMaster.MASTER);
- Configuration conf = master.getConfiguration();
-
- BufferedReader br = new BufferedReader(new InputStreamReader(request.getInputStream()));
- String json = "";
- if(br != null) {
- json = br.readLine();
- }
-
- JSONObject jsonObject = new JSONObject(json);
- String sQuery = jsonObject.getString("sQuery");
- String sControlStmts = jsonObject.getString("sControlStmts");
-
- if(sQuery == null || sQuery.trim().length() < 1) {
- response.setContentType("text/plain");
- response.setStatus(response.SC_INTERNAL_SERVER_ERROR);
- response.getWriter().print("The query text cannot be empty");
- return;
- }
-
- QueryPlanModel qpm = new QueryPlanModel();
- qpm.GeneratePlan(master.getServerManager().getJdbcT4Util(),sQuery, sControlStmts);
- QueryPlanResponse qpr = qpm.getQueryPlanResponse();
- ObjectMapper mapper = new ObjectMapper();
- JSONObject queryPlanJson = null;
- queryPlanJson = new JSONObject(mapper.writeValueAsString(qpr));
- response.setContentType("application/json");
- response.getWriter().print(queryPlanJson);
- } catch (Exception e) {
- response.setContentType("text/plain");
- response.setStatus(response.SC_INTERNAL_SERVER_ERROR);
- response.getWriter().print(e.getMessage());
- }
- %>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/resources/dcs-webapps/master/querystats.html
----------------------------------------------------------------------
diff --git a/dcs/src/main/resources/dcs-webapps/master/querystats.html b/dcs/src/main/resources/dcs-webapps/master/querystats.html
deleted file mode 100644
index d7f2fdb..0000000
--- a/dcs/src/main/resources/dcs-webapps/master/querystats.html
+++ /dev/null
@@ -1,89 +0,0 @@
-<!-- @@@ START COPYRIGHT @@@ -->
-<!--
-<!-- Licensed to the Apache Software Foundation (ASF) under one
-<!-- or more contributor license agreements. See the NOTICE file
-<!-- distributed with this work for additional information
-<!-- regarding copyright ownership. The ASF licenses this file
-<!-- to you under the Apache License, Version 2.0 (the
-<!-- "License"); you may not use this file except in compliance
-<!-- with the License. You may obtain a copy of the License at
-<!--
-<!-- http://www.apache.org/licenses/LICENSE-2.0
-<!--
-<!-- Unless required by applicable law or agreed to in writing,
-<!-- software distributed under the License is distributed on an
-<!-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-<!-- KIND, either express or implied. See the License for the
-<!-- specific language governing permissions and limitations
-<!-- under the License.
-<!--
-<!-- @@@ END COPYRIGHT @@@ -->
-<head>
- <link type="text/css" href="datatables/css/jquery.dataTables_themeroller.css" rel="stylesheet" />
- <link type="text/css" href="datatables/css/demo_page.css" rel="stylesheet" />
- <link type="text/css" href="datatables/css/demo_table_jui.css" rel="stylesheet" />
- <link type="text/css" href="jquery-ui/jquery-ui.css" rel="stylesheet" />
- <script type="text/javascript" src="js/lib/jquery-1.11.0.js"></script>
- <script type="text/javascript" src="datatables/js/jquery.dataTables.js"></script>
-
-</head>
-
- <div id="progress">
- <p><span style="font-family: Georgia, 'Times New Roman', Times, serif; font-size: 18px;">Fetching repository data ...</p>
- <img src="img/ajax-loader.gif"/>
- </div>
- <div id="query-stats"></div>
-
-<script type="text/javascript">
-$(document).ready(function(){
- document.body.style.cursor = 'wait';
- $('#query-stats').html('').css('color','black');
- var jqxhr = $.getJSON('querystats.jsp',function(result){
-
- var keys;
- $.each(result, function(i, data){
- keys = Object.keys(data);
- });
-
- var sb = '<table class="display1" id="query-stats-table" style="font-size:small"><thead><tr>';
- for (var r=0,len=keys.length; r<len; r++) {
- sb += '<th><b></b>' + keys[r] + '</th>';
- }
- sb += '</tr></thead><tbody> </tbody></table>';
- $('#query-stats').html( sb );
-
- var aoColumns = [];
- var aaData = [];
-
- $.each(result, function(i, data){
- var rowData = [];
- $.each(keys, function(k, v) {
- rowData.push(data[v]);
- });
- aaData.push(rowData);
- });
-
- // add needed columns
- $.each(keys, function(k, v) {
- obj = new Object();
- obj.sTitle = v;
- aoColumns.push(obj);
- });
-
- $('#query-stats-table').dataTable({"bProcessing": true,"bJQueryUI": true,"sPaginationType": "full_numbers","aaData": aaData, "aoColumns" : aoColumns });
-
- var elem = document.getElementById('progress');
- elem.parentNode.removeChild(elem);
- document.body.style.cursor = 'default';
-
- });
-
- jqxhr.fail(function(){
- $('#query-stats').html( jqxhr.responseText ).css('color','red');
- var elem = document.getElementById('progress');
- elem.parentNode.removeChild(elem);
- document.body.style.cursor = 'default';
- });
-
- });
-</script>
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/resources/dcs-webapps/master/querystats.jsp
----------------------------------------------------------------------
diff --git a/dcs/src/main/resources/dcs-webapps/master/querystats.jsp b/dcs/src/main/resources/dcs-webapps/master/querystats.jsp
deleted file mode 100644
index 4f1e668..0000000
--- a/dcs/src/main/resources/dcs-webapps/master/querystats.jsp
+++ /dev/null
@@ -1,89 +0,0 @@
-<%--
-/**
- *@@@ START COPYRIGHT @@@
- *
- *Licensed to the Apache Software Foundation (ASF) under one
- *or more contributor license agreements. See the NOTICE file
- *distributed with this work for additional information
- *regarding copyright ownership. The ASF licenses this file
- *to you under the Apache License, Version 2.0 (the
- *"License"); you may not use this file except in compliance
- *with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- *Unless required by applicable law or agreed to in writing,
- *software distributed under the License is distributed on an
- *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *KIND, either express or implied. See the License for the
- *specific language governing permissions and limitations
- *under the License.
- *
- * @@@ END COPYRIGHT @@@
- */
---%>
-<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
-<%@ page contentType="text/html;charset=UTF-8"
- import="java.io.*"
- import="java.util.*"
- import="java.sql.*"
- import="org.apache.hadoop.conf.Configuration"
- import="org.trafodion.dcs.master.DcsMaster"
- import="org.trafodion.dcs.util.DcsConfiguration"
- import="org.trafodion.dcs.Constants"
- import="org.trafodion.dcs.util.Bytes"
- import="org.trafodion.dcs.util.JdbcT4Util"
- import="org.codehaus.jettison.json.JSONArray"
- import="org.codehaus.jettison.json.JSONException"
- import="org.codehaus.jettison.json.JSONObject"
- %>
-<%
-
- java.sql.Connection connection = null;
- java.sql.Statement stmt = null;
- java.sql.ResultSet rs = null;
-
- try {
- DcsMaster master = (DcsMaster)getServletContext().getAttribute(DcsMaster.MASTER);
- Configuration conf = master.getConfiguration();
- boolean readOnly = conf.getBoolean("dcs.master.ui.readonly", false);
- String masterServerName = master.getServerName();
- int masterInfoPort = master.getInfoPort();
- String trafodionHome = master.getTrafodionHome();
- boolean trafodionLogs = conf.getBoolean(Constants.DCS_MASTER_TRAFODION_LOGS, Constants.DEFAULT_DCS_MASTER_TRAFODION_LOGS);
- String queryText = conf.get(Constants.TRAFODION_REPOS_METRIC_QUERY_TABLE_QUERY,Constants.DEFAULT_TRAFODION_REPOS_METRIC_QUERY_TABLE_QUERY);
- JSONArray metricQueryJson = null;
- JdbcT4Util jdbcT4Util = master.getServerManager().getJdbcT4Util();
- connection = jdbcT4Util.getConnection();
- stmt = connection.createStatement();
- rs = stmt.executeQuery(queryText);
- metricQueryJson = jdbcT4Util.convertResultSetToJSON(rs);
- rs.close();
- stmt.close();
- connection.close();
- response.setContentType("application/json");
- response.getWriter().print(metricQueryJson);
- } catch (SQLException e) {
- SQLException nextException = e;
- StringBuilder sb = new StringBuilder();
- do {
- sb.append(nextException.getMessage());
- sb.append("\nSQLState " + nextException.getSQLState());
- sb.append("\nError Code " + nextException.getErrorCode());
- } while ((nextException = nextException.getNextException()) != null);
- response.setContentType("text/plain");
- response.setStatus(response.SC_INTERNAL_SERVER_ERROR);
- response.getWriter().print(sb.toString());
- } catch (Exception e) {
- response.setContentType("text/plain");
- response.setStatus(response.SC_INTERNAL_SERVER_ERROR);
- response.getWriter().print(e.getMessage());
- } finally {
- if (rs != null)
- rs.close();
- if (stmt != null)
- stmt.close();
- if (connection != null)
- connection.close();
- }
-%>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/resources/dcs-webapps/master/repository.jsp
----------------------------------------------------------------------
diff --git a/dcs/src/main/resources/dcs-webapps/master/repository.jsp b/dcs/src/main/resources/dcs-webapps/master/repository.jsp
deleted file mode 100644
index bf748fa..0000000
--- a/dcs/src/main/resources/dcs-webapps/master/repository.jsp
+++ /dev/null
@@ -1,114 +0,0 @@
-<%--
-/**
- * @@@ START COPYRIGHT @@@
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- * @@@ END COPYRIGHT @@@
- */
---%>
-<%@ page contentType="text/html;charset=UTF-8"
- import="java.io.*"
- import="java.util.*"
- import="org.apache.hadoop.conf.Configuration"
- import="org.trafodion.dcs.master.DcsMaster"
- import="org.trafodion.dcs.util.DcsConfiguration"
- import="org.trafodion.dcs.Constants"
- import="org.trafodion.dcs.util.Bytes"
- import="org.codehaus.jettison.json.JSONArray"
- import="org.codehaus.jettison.json.JSONException"
- import="org.codehaus.jettison.json.JSONObject"
- %>
-<%
- DcsMaster master = (DcsMaster)getServletContext().getAttribute(DcsMaster.MASTER);
- Configuration conf = master.getConfiguration();
- boolean readOnly = conf.getBoolean("dcs.master.ui.readonly", false);
- String masterServerName = master.getServerName();
- int masterInfoPort = master.getInfoPort();
- String trafodionHome = master.getTrafodionHome();
- String type = request.getParameter("type");
-%>
-<?xml version="1.0" encoding="UTF-8" ?>
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
-<title>Repository: <%= type %></title>
-<!--
-<link rel="stylesheet" type="text/css" href="/static/dcs.css" />
--->
- <title>Trafodion Query Tools</title>
- <link rel="stylesheet" type="text/css" href="css/stylesheet.css" />
- <link rel="stylesheet" type="text/css" href="jquery-ui/jquery-ui.css" />
- <script type="text/javascript" src="js/lib/jquery-1.11.0.js"></script>
- <script type="text/javascript" src="jquery-ui/jquery-ui.js"> </script>
-
- <script type="text/javascript">
- $(function() {
- $("#tabs").tabs({
- ajaxOptions: {
- eror: function(xhr, status, index, anchor) {
- $(anchor.hash).html("Failed to load this tab!");
- }
- }
- });
-
- $('#tabs div.ui-tabs-panel').height(function() {
- return $('#tabs-container').height()
- - $('#tabs-container #tabs ul.ui-tabs-nav').outerHeight(true)
- - ($('#tabs').outerHeight(true) - $('#tabs').height())
- // visible is important here, sine height of an invisible panel is 0
- - ($('#tabs div.ui-tabs-panel:visible').outerHeight(true)
- - $('#tabs div.ui-tabs-panel:visible').height());
- });
- });
- </script>
-
- <style type="text/css">
- .ui-tabs .ui-tabs-panel {
- overflow: auto;
- }
- </style>
-</head>
-<body>
-
- <div class="bannerArea">
- <div class="container1">
- <div style="padding-bottom: 5px; font-weight: bold; font-size: 28px; position: absolute;left:5px;top: 5px; color: #FFF; font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif; font-style: italic;">
- <span id="Label1">Trafodion Query Tools</span>
- </div>
- </div>
- </div>
-
- <div id="tabs-container" style="height:1000px; border:1px #aaa solid;">
- <div id="tabs">
- <ul>
- <li><a href="explain.html">Query Plan</a></li>
- <li><a href="querystats.html">Query Statistics</a></li>
- <li><a href="sessions.html">Sessions</a></li>
- <li><a href="aggr_querystats.html">Aggregated Query Statistics</a></li>
- </ul>
- </div>
- </div>
-
- <script>
- $(document).ready(function() {
- $("#tabs").tabs().css({'height': '100%','overflow': 'auto'})
- });
- </script>
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/resources/dcs-webapps/master/sessions.html
----------------------------------------------------------------------
diff --git a/dcs/src/main/resources/dcs-webapps/master/sessions.html b/dcs/src/main/resources/dcs-webapps/master/sessions.html
deleted file mode 100644
index c2af17f..0000000
--- a/dcs/src/main/resources/dcs-webapps/master/sessions.html
+++ /dev/null
@@ -1,87 +0,0 @@
-<!-- @@@ START COPYRIGHT @@@ -->
-<!--
-<!-- Licensed to the Apache Software Foundation (ASF) under one
-<!-- or more contributor license agreements. See the NOTICE file
-<!-- distributed with this work for additional information
-<!-- regarding copyright ownership. The ASF licenses this file
-<!-- to you under the Apache License, Version 2.0 (the
-<!-- "License"); you may not use this file except in compliance
-<!-- with the License. You may obtain a copy of the License at
-<!--
-<!-- http://www.apache.org/licenses/LICENSE-2.0
-<!--
-<!-- Unless required by applicable law or agreed to in writing,
-<!-- software distributed under the License is distributed on an
-<!-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-<!-- KIND, either express or implied. See the License for the
-<!-- specific language governing permissions and limitations
-<!-- under the License.
-<!--
-<!-- @@@ END COPYRIGHT @@@ -->
-<head>
- <link type="text/css" href="datatables/css/jquery.dataTables_themeroller.css" rel="stylesheet" />
- <link type="text/css" href="datatables/css/demo_page.css" rel="stylesheet" />
- <link type="text/css" href="datatables/css/demo_table_jui.css" rel="stylesheet" />
- <link type="text/css" href="jquery-ui/jquery-ui.css" rel="stylesheet" />
- <script type="text/javascript" src="js/lib/jquery-1.11.0.js" />
- <script type="text/javascript" src="datatables/js/jquery.dataTables.js"/></script>
-</head>
-
- <div id="progress">
- <p><span style="font-family: Georgia, 'Times New Roman', Times, serif; font-size: 18px;">Fetching session data ...</p>
- <img src="img/ajax-loader.gif"/>
- </div>
- <div id="dynamic-sessions"></div>
-
-<script type="text/javascript">
-$(document).ready(function(){
- document.body.style.cursor = 'wait';
- $('#dynamic-sessions').html('').css('color','black');
- var jqxhr = $.getJSON('sessions.jsp',function(result){
-
- var keys;
- $.each(result, function(i, data){
- keys = Object.keys(data);
- });
-
- var sb = '<table class="display1" id="sessions-table" style="font-size:small"><thead><tr>';
- for (var r=0,len=keys.length; r<len; r++) {
- sb += '<th><b></b>' + keys[r] + '</th>';
- }
- sb += '</tr></thead><tbody> </tbody></table>';
- $('#dynamic-sessions').html( sb );
-
- var aoColumns = [];
- var aaData = [];
-
- $.each(result, function(i, data){
- var rowData = [];
- $.each(keys, function(k, v) {
- rowData.push(data[v]);
- });
- aaData.push(rowData);
- });
-
- // add needed columns
- $.each(keys, function(k, v) {
- obj = new Object();
- obj.sTitle = v;
- aoColumns.push(obj);
- });
-
- $('#sessions-table').dataTable({"bProcessing": true,"bJQueryUI": true,"sPaginationType": "full_numbers","aaData": aaData, "aoColumns" : aoColumns });
-
- var elem = document.getElementById('progress');
- elem.parentNode.removeChild(elem);
- document.body.style.cursor = 'default';
-
- });
-
- jqxhr.fail(function(){
- $('#dynamic-sessions').html( jqxhr.responseText ).css('color','red');
- var elem = document.getElementById('progress');
- elem.parentNode.removeChild(elem);
- document.body.style.cursor = 'default';
- });
- });
-</script>
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/resources/dcs-webapps/master/sessions.jsp
----------------------------------------------------------------------
diff --git a/dcs/src/main/resources/dcs-webapps/master/sessions.jsp b/dcs/src/main/resources/dcs-webapps/master/sessions.jsp
deleted file mode 100644
index c3b8ba7..0000000
--- a/dcs/src/main/resources/dcs-webapps/master/sessions.jsp
+++ /dev/null
@@ -1,89 +0,0 @@
-<%--
-/**
- *@@@ START COPYRIGHT @@@
- *
- *Licensed to the Apache Software Foundation (ASF) under one
- *or more contributor license agreements. See the NOTICE file
- *distributed with this work for additional information
- *regarding copyright ownership. The ASF licenses this file
- *to you under the Apache License, Version 2.0 (the
- *"License"); you may not use this file except in compliance
- *with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- *Unless required by applicable law or agreed to in writing,
- *software distributed under the License is distributed on an
- *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *KIND, either express or implied. See the License for the
- *specific language governing permissions and limitations
- *under the License.
- *
- * @@@ END COPYRIGHT @@@
- */
-
---%>
-<%@ page contentType="text/html;charset=UTF-8"
- import="java.io.*"
- import="java.util.*"
- import="java.sql.*"
- import="org.apache.hadoop.conf.Configuration"
- import="org.trafodion.dcs.master.DcsMaster"
- import="org.trafodion.dcs.util.DcsConfiguration"
- import="org.trafodion.dcs.Constants"
- import="org.trafodion.dcs.util.Bytes"
- import="org.trafodion.dcs.util.JdbcT4Util"
- import="org.codehaus.jettison.json.JSONArray"
- import="org.codehaus.jettison.json.JSONException"
- import="org.codehaus.jettison.json.JSONObject"
- %>
-<%
-
- java.sql.Connection connection = null;
- java.sql.Statement stmt = null;
- java.sql.ResultSet rs = null;
-
- try {
- DcsMaster master = (DcsMaster)getServletContext().getAttribute(DcsMaster.MASTER);
- Configuration conf = master.getConfiguration();
- boolean readOnly = conf.getBoolean("dcs.master.ui.readonly", false);
- String masterServerName = master.getServerName();
- int masterInfoPort = master.getInfoPort();
- String trafodionHome = master.getTrafodionHome();
- boolean trafodionLogs = conf.getBoolean(Constants.DCS_MASTER_TRAFODION_LOGS, Constants.DEFAULT_DCS_MASTER_TRAFODION_LOGS);
- String queryText = conf.get(Constants.TRAFODION_REPOS_METRIC_SESSION_TABLE_QUERY,Constants.DEFAULT_TRAFODION_REPOS_METRIC_SESSION_TABLE_QUERY);
- JSONArray metricSessionJson = null;
- JdbcT4Util jdbcT4Util = master.getServerManager().getJdbcT4Util();
- connection = jdbcT4Util.getConnection();
- stmt = connection.createStatement();
- rs = stmt.executeQuery(queryText);
- metricSessionJson = jdbcT4Util.convertResultSetToJSON(rs);
- rs.close();
- stmt.close();
- connection.close();
- response.setContentType("application/json");
- response.getWriter().print(metricSessionJson);
- } catch (SQLException e) {
- SQLException nextException = e;
- StringBuilder sb = new StringBuilder();
- do {
- sb.append(nextException.getMessage());
- sb.append("\nSQLState " + nextException.getSQLState());
- sb.append("\nError Code " + nextException.getErrorCode());
- } while ((nextException = nextException.getNextException()) != null);
- response.setContentType("text/plain");
- response.setStatus(response.SC_INTERNAL_SERVER_ERROR);
- response.getWriter().print(sb.toString());
- } catch (Exception e) {
- response.setContentType("text/plain");
- response.setStatus(response.SC_INTERNAL_SERVER_ERROR);
- response.getWriter().print(e.getMessage());
- } finally {
- if (rs != null)
- rs.close();
- if (stmt != null)
- stmt.close();
- if (connection != null)
- connection.close();
- }
-%>
\ No newline at end of file
[3/4] incubator-trafodion git commit: Merge branch 'master' of
github.com:apache/incubator-trafodion into wrkbrnch
Posted by ar...@apache.org.
Merge branch 'master' of github.com:apache/incubator-trafodion into wrkbrnch
Conflicts:
dcs/pom.xml
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/9291936e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/9291936e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/9291936e
Branch: refs/heads/master
Commit: 9291936e64aa51bc3942184c95296026128d187a
Parents: 7fe6dd1 5a6549b
Author: Anuradha Hegde <an...@esgyn.com>
Authored: Thu Mar 10 16:14:12 2016 +0000
Committer: Anuradha Hegde <an...@esgyn.com>
Committed: Thu Mar 10 16:14:12 2016 +0000
----------------------------------------------------------------------
core/rest/pom.xml | 2 +-
core/sqf/Makefile | 2 +-
.../sqf/conf/log4cxx.trafodion.masterexe.config | 1 +
core/sqf/hbase_utilities/pom.xml | 2 +-
core/sqf/monitor/linux/shell.cxx | 12 +
core/sqf/sqenvcom.sh | 5 +
core/sqf/sql/scripts/gensq.pl | 54 +-
core/sqf/sql/scripts/genstats.sh | 43 +
core/sqf/sql/scripts/get_libhdfs_files | 203 +-
core/sqf/sql/scripts/sqnodeipcrm | 2 +-
core/sqf/sql/scripts/sqstart | 3 +-
core/sqf/sql/scripts/sqstop | 2 +-
core/sql/SqlCompilerDebugger/mk.sh | 5 +
core/sql/cli/Cli.cpp | 442 ++-
core/sql/cli/Cli.h | 15 +-
core/sql/cli/CliExpExchange.cpp | 18 +-
core/sql/cli/CliExtern.cpp | 54 +-
core/sql/cli/Descriptor.cpp | 6 +-
core/sql/comexe/ComTdbHbaseAccess.cpp | 2 +-
core/sql/comexe/ComTdbHbaseAccess.h | 2 +-
core/sql/common/CharType.cpp | 3 +-
core/sql/common/CharType.h | 2 +-
core/sql/executor/ExExeUtilLoad.cpp | 3 +-
core/sql/executor/ExHbaseAccess.h | 3 +
core/sql/executor/ExHbaseIUD.cpp | 27 +-
core/sql/executor/hiveHook.cpp | 2 +-
core/sql/exp/ExpLOB.cpp | 142 +-
core/sql/exp/ExpLOB.h | 41 +-
core/sql/exp/ExpLOBaccess.cpp | 2905 +++++++++---------
core/sql/exp/ExpLOBaccess.h | 288 +-
core/sql/exp/ExpLOBenums.h | 5 +-
core/sql/exp/ExpLOBexternal.h | 20 +-
core/sql/exp/ExpLOBinterface.cpp | 291 +-
core/sql/exp/ExpLOBinterface.h | 24 +-
core/sql/exp/ExpLOBprocess.cpp | 494 +--
core/sql/exp/ExpLOBprocess.h | 2 +-
core/sql/generator/GenExpGenerator.cpp | 3 +-
core/sql/generator/GenItemFunc.cpp | 17 +-
core/sql/generator/GenPreCode.cpp | 31 +-
core/sql/generator/GenRelUpdate.cpp | 47 +-
core/sql/nskgmake/Makerules.linux | 8 +-
core/sql/nskgmake/SqlCompilerDebugger/Makefile | 5 +-
core/sql/optimizer/BindRI.cpp | 45 +-
core/sql/optimizer/ItemFunc.h | 17 +-
core/sql/optimizer/NATable.cpp | 5 +-
core/sql/optimizer/ValueDesc.cpp | 5 +-
core/sql/optimizer/ValueDesc.h | 6 +-
core/sql/regress/compGeneral/EXPECTED013.SB | 48 +
core/sql/regress/compGeneral/TEST013 | 28 +
core/sql/regress/core/EXPECTED056.SB | 6 -
core/sql/regress/core/TEST029 | 1 -
core/sql/regress/core/TEST056 | 2 -
core/sql/regress/executor/EXPECTED130 | 106 +-
core/sql/regress/executor/TEST130 | 32 +
core/sql/regress/tools/dll-compile.ksh | 4 +-
core/sql/regress/tools/runregr_udr.ksh | 65 +-
core/sql/sqlcomp/CmpSeabaseDDLcleanup.cpp | 7 +-
core/sql/sqlcomp/CmpSeabaseDDLindex.cpp | 2 +-
core/sql/sqlcomp/CmpSeabaseDDLtable.cpp | 25 +-
core/sql/sqlcomp/DefaultConstants.h | 1 +
core/sql/sqlcomp/nadefaults.cpp | 12 +-
core/sql/ustat/hs_cli.cpp | 22 +-
core/sql/ustat/hs_globals.cpp | 2 +-
dcs/pom.xml | 2 +-
install/installer/dcs_installer | 8 +-
install/installer/parseHBaseSite.py | 55 +
install/installer/traf_add_sudoAccess | 5 +-
install/installer/traf_config_check | 8 +-
install/installer/traf_hortonworks_mods98 | 26 -
install/installer/traf_sqgen | 2 +-
install/installer/trafodion_install | 17 +-
install/traf_tools_setup.sh | 56 +-
licenses/lic-clients-bin | 33 +-
licenses/lic-winodbc-bin | 50 +
tools/docker/Dockerfile | 45 +
tools/docker/build-base-docker.sh | 29 +
tools/docker/start-compile-docker.sh | 67 +
wms/pom.xml | 2 +-
78 files changed, 3434 insertions(+), 2650 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/9291936e/dcs/pom.xml
----------------------------------------------------------------------
diff --cc dcs/pom.xml
index 351c5ca,d8104f3..445e365
--- a/dcs/pom.xml
+++ b/dcs/pom.xml
@@@ -491,7 -498,7 +491,7 @@@
<compileSource>1.6</compileSource>
<!-- Dependencies -->
- <hadoop.version>2.6.0</hadoop.version>
- <hadoop.version>${env.HADOOP_DEP_VER}</hadoop.version>
++ <hadoop.version>${env.HADOOP_DEP_VER}</hadoop.version>
<commons-cli.version>1.2</commons-cli.version>
<commons-codec.version>1.4</commons-codec.version>
<commons-io.version>2.1</commons-io.version>
[2/4] incubator-trafodion git commit: Removed the unused and declared
dependencies.
Posted by ar...@apache.org.
Removed the unused and declared dependencies.
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/7fe6dd13
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/7fe6dd13
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/7fe6dd13
Branch: refs/heads/master
Commit: 7fe6dd13600a931986769fb30c886ca6efb7c7ee
Parents: e24ea17
Author: Anuradha Hegde <an...@esgyn.com>
Authored: Sat Mar 5 17:24:44 2016 +0000
Committer: Anuradha Hegde <an...@esgyn.com>
Committed: Sat Mar 5 17:24:44 2016 +0000
----------------------------------------------------------------------
dcs/bin/dcs | 20 -
dcs/bin/dcs-config.sh | 21 -
dcs/bin/dcs-daemon.sh | 21 -
dcs/bin/dcs-daemons.sh | 20 -
dcs/pom.xml | 151 +-----
dcs/src/assembly/all.xml | 11 +-
.../org/trafodion/dcs/master/DcsMaster.java | 2 -
.../dcs/master/MasterStatusServlet.java | 22 +-
.../java/org/trafodion/dcs/rest/DcsRest.java | 215 --------
.../trafodion/dcs/rest/GetStatusResponse.java | 50 --
.../org/trafodion/dcs/rest/RESTServlet.java | 172 ------
.../org/trafodion/dcs/rest/ResourceBase.java | 34 --
.../org/trafodion/dcs/rest/ResourceConfig.java | 31 --
.../org/trafodion/dcs/rest/RestConstants.java | 63 ---
.../org/trafodion/dcs/rest/RootResource.java | 102 ----
.../org/trafodion/dcs/rest/ServerConnector.java | 79 ---
.../org/trafodion/dcs/rest/ServerResource.java | 158 ------
.../org/trafodion/dcs/rest/VersionResource.java | 122 -----
.../trafodion/dcs/rest/WorkloadResource.java | 140 -----
.../org/trafodion/dcs/rest/client/Client.java | 504 ------------------
.../org/trafodion/dcs/rest/client/Cluster.java | 102 ----
.../org/trafodion/dcs/rest/client/Response.java | 129 -----
.../trafodion/dcs/rest/model/ServerModel.java | 530 -------------------
.../trafodion/dcs/rest/model/VersionModel.java | 193 -------
.../dcs/rest/model/WorkloadListModel.java | 225 --------
.../trafodion/dcs/rest/model/WorkloadModel.java | 139 -----
.../dcs/rest/provider/JAXBContextResolver.java | 84 ---
.../producer/PlainTextMessageBodyProducer.java | 92 ----
.../dcs-webapps/master/aggr_querystats.html | 88 ---
.../dcs-webapps/master/aggr_querystats.jsp | 85 ---
.../resources/dcs-webapps/master/explain.html | 62 ---
.../resources/dcs-webapps/master/queryPlan.jsp | 77 ---
.../dcs-webapps/master/querystats.html | 89 ----
.../resources/dcs-webapps/master/querystats.jsp | 89 ----
.../resources/dcs-webapps/master/repository.jsp | 114 ----
.../resources/dcs-webapps/master/sessions.html | 87 ---
.../resources/dcs-webapps/master/sessions.jsp | 89 ----
37 files changed, 15 insertions(+), 4197 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/bin/dcs
----------------------------------------------------------------------
diff --git a/dcs/bin/dcs b/dcs/bin/dcs
index 5c506fe..84246d0 100755
--- a/dcs/bin/dcs
+++ b/dcs/bin/dcs
@@ -21,26 +21,6 @@
#
#* @@@ END COPYRIGHT @@@
# */
-#/**
-# * Copyright 2007 The Apache Software Foundation
-# *
-# * Licensed to the Apache Software Foundation (ASF) under one
-# * or more contributor license agreements. See the NOTICE file
-# * distributed with this work for additional information
-# * regarding copyright ownership. The ASF licenses this file
-# * to you under the Apache License, Version 2.0 (the
-# * "License"); you may not use this file except in compliance
-# * with the License. You may obtain a copy of the License at
-# *
-# * http://www.apache.org/licenses/LICENSE-2.0
-# *
-# * Unless required by applicable law or agreed to in writing, software
-# * distributed under the License is distributed on an "AS IS" BASIS,
-# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# * See the License for the specific language governing permissions and
-# * limitations under the License.
-# */
-#
# The dcs command script.
#
# Environment Variables:
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/bin/dcs-config.sh
----------------------------------------------------------------------
diff --git a/dcs/bin/dcs-config.sh b/dcs/bin/dcs-config.sh
index 023521a..aec9e57 100755
--- a/dcs/bin/dcs-config.sh
+++ b/dcs/bin/dcs-config.sh
@@ -21,27 +21,6 @@
# # @@@ END COPYRIGHT @@@
# */
#
-#/**
-# * Copyright 2007 The Apache Software Foundation
-# *
-# * Licensed to the Apache Software Foundation (ASF) under one
-# * or more contributor license agreements. See the NOTICE file
-# * distributed with this work for additional information
-# * regarding copyright ownership. The ASF licenses this file
-# * to you under the Apache License, Version 2.0 (the
-# * "License"); you may not use this file except in compliance
-# * with the License. You may obtain a copy of the License at
-# *
-# * http://www.apache.org/licenses/LICENSE-2.0
-# *
-# * Unless required by applicable law or agreed to in writing, software
-# * distributed under the License is distributed on an "AS IS" BASIS,
-# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# * See the License for the specific language governing permissions and
-# * limitations under the License.
-# */
-
-#
# should not be executable directly
# also should not be passed any arguments, since we need original $*
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/bin/dcs-daemon.sh
----------------------------------------------------------------------
diff --git a/dcs/bin/dcs-daemon.sh b/dcs/bin/dcs-daemon.sh
index 0061aec..530d356 100755
--- a/dcs/bin/dcs-daemon.sh
+++ b/dcs/bin/dcs-daemon.sh
@@ -21,27 +21,6 @@
#
# @@@ END COPYRIGHT @@@
# */
-#
-#/**
-# * Copyright 2007 The Apache Software Foundation
-# *
-# * Licensed to the Apache Software Foundation (ASF) under one
-# * or more contributor license agreements. See the NOTICE file
-# * distributed with this work for additional information
-# * regarding copyright ownership. The ASF licenses this file
-# * to you under the Apache License, Version 2.0 (the
-# * "License"); you may not use this file except in compliance
-# * with the License. You may obtain a copy of the License at
-# *
-# * http://www.apache.org/licenses/LICENSE-2.0
-# *
-# * Unless required by applicable law or agreed to in writing, software
-# * distributed under the License is distributed on an "AS IS" BASIS,
-# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# * See the License for the specific language governing permissions and
-# * limitations under the License.
-# */
-#
# Runs a DCS command as a daemon.
#
# Environment Variables
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/bin/dcs-daemons.sh
----------------------------------------------------------------------
diff --git a/dcs/bin/dcs-daemons.sh b/dcs/bin/dcs-daemons.sh
index 09fc671..1af1cad 100755
--- a/dcs/bin/dcs-daemons.sh
+++ b/dcs/bin/dcs-daemons.sh
@@ -22,26 +22,6 @@
# @@@ END COPYRIGHT @@@
# */
#
-#/**
-# * Copyright 2007 The Apache Software Foundation
-# *
-# * Licensed to the Apache Software Foundation (ASF) under one
-# * or more contributor license agreements. See the NOTICE file
-# * distributed with this work for additional information
-# * regarding copyright ownership. The ASF licenses this file
-# * to you under the Apache License, Version 2.0 (the
-# * "License"); you may not use this file except in compliance
-# * with the License. You may obtain a copy of the License at
-# *
-# * http://www.apache.org/licenses/LICENSE-2.0
-# *
-# * Unless required by applicable law or agreed to in writing, software
-# * distributed under the License is distributed on an "AS IS" BASIS,
-# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# * See the License for the specific language governing permissions and
-# * limitations under the License.
-# */
-#
usage="Usage: dcs-daemons.sh [--config <dcs-confdir>] \
[--hosts serversfile] [start|stop] command args..."
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/pom.xml
----------------------------------------------------------------------
diff --git a/dcs/pom.xml b/dcs/pom.xml
index 1fb2938..351c5ca 100644
--- a/dcs/pom.xml
+++ b/dcs/pom.xml
@@ -182,13 +182,6 @@
outputdir="${generated.sources}/java"
package="org.trafodion.dcs.generated.server"
webxml="${build.webapps}/server/WEB-INF/web.xml"/>
-<!--
- <mkdir dir="${build.webapps}/rest/WEB-INF"/>
- <jspcompiler uriroot="${src.webapps}/rest"
- outputdir="${generated.sources}/java"
- package="org.trafodion.dcs.generated.rest"
- webxml="${build.webapps}/rest/WEB-INF/web.xml"/>
--->
<exec executable="sh">
<arg line="${basedir}/src/saveVersion.sh ${project.version} ${generated.sources}/java"/>
</exec>
@@ -498,7 +491,7 @@
<compileSource>1.6</compileSource>
<!-- Dependencies -->
- <hadoop.version>2.6.0</hadoop.version>
+ <hadoop.version>2.6.0</hadoop.version>
<commons-cli.version>1.2</commons-cli.version>
<commons-codec.version>1.4</commons-codec.version>
<commons-io.version>2.1</commons-io.version>
@@ -508,7 +501,7 @@
<commons-configuration.version>1.6</commons-configuration.version>
<metrics-core.version>2.1.2</metrics-core.version>
<guava.version>11.0.2</guava.version>
- <jackson.version>1.8.8</jackson.version>
+ <jackson.version>1.9.13</jackson.version>
<jasper.version>5.5.23</jasper.version>
<jamon.runtime.version>2.4.0</jamon.runtime.version>
<jaxb-api.version>2.1</jaxb-api.version>
@@ -516,7 +509,7 @@
<jetty.jspapi.version>6.1.14</jetty.jspapi.version>
<jersey.version>1.8</jersey.version>
<junit.version>4.10</junit.version>
- <slf4j.version>1.4.3</slf4j.version>
+ <slf4j.version>1.4.3</slf4j.version>
<log4j.version>1.2.16</log4j.version>
<zookeeper.version>3.4.5</zookeeper.version>
<jython-standalone.version>2.5.3</jython-standalone.version>
@@ -566,16 +559,6 @@
</dependency>
<!-- General dependencies -->
- <dependency>
- <groupId>com.yammer.metrics</groupId>
- <artifactId>metrics-core</artifactId>
- <version>${metrics-core.version}</version>
- </dependency>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- <version>${guava.version}</version>
- </dependency>
<dependency>
<groupId>org.python</groupId>
<artifactId>jython-standalone</artifactId>
@@ -587,26 +570,11 @@
<version>${commons-cli.version}</version>
</dependency>
<dependency>
- <groupId>commons-configuration</groupId>
- <artifactId>commons-configuration</artifactId>
- <version>${commons-configuration.version}</version>
- </dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- <version>${commons-codec.version}</version>
- </dependency>
- <dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons-io.version}</version>
</dependency>
<dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>${commons-lang.version}</version>
- </dependency>
- <dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>${commons-logging.version}</version>
@@ -671,34 +639,14 @@
<version>${jetty.jspapi.version}</version>
</dependency>
<dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>servlet-api-2.5</artifactId>
- <version>${jetty.jspapi.version}</version>
+ <groupId>displaytag</groupId>
+ <artifactId>displaytag</artifactId>
+ <version>${displaytag.version}</version>
</dependency>
<!-- While jackson is also a dependency of both jersey and avro, these
can bring in jars from different, incompatible versions. We force
the same version with these dependencies -->
<dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-core-asl</artifactId>
- <version>${jackson.version}</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-mapper-asl</artifactId>
- <version>${jackson.version}</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-jaxrs</artifactId>
- <version>${jackson.version}</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-xc</artifactId>
- <version>${jackson.version}</version>
- </dependency>
- <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
@@ -708,98 +656,13 @@
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
- <dependency>
- <!--If this is not in the runtime lib, we get odd
- "2009-02-27 11:38:39.504::WARN: failed jsp
- java.lang.NoSuchFieldError: IS_SECURITY_ENABLED"
- exceptions out of jetty deploying webapps.
- St.Ack Thu May 20 01:04:41 PDT 2010
- -->
- <groupId>tomcat</groupId>
- <artifactId>jasper-compiler</artifactId>
- <version>${jasper.version}</version>
- <scope>runtime</scope>
- <exclusions>
- <exclusion>
- <groupId>javax.servlet</groupId>
- <artifactId>jsp-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>ant</groupId>
- <artifactId>ant</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>tomcat</groupId>
- <artifactId>jasper-runtime</artifactId>
- <version>${jasper.version}</version>
- <scope>runtime</scope>
- <exclusions>
- <exclusion>
- <groupId>javax.servlet</groupId>
- <artifactId>jsp-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
+
<dependency>
<groupId>org.jamon</groupId>
<artifactId>jamon-runtime</artifactId>
<version>${jamon.runtime.version}</version>
</dependency>
-
- <!-- REST dependencies -->
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-core</artifactId>
- <version>${jersey.version}</version>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-json</artifactId>
- <version>${jersey.version}</version>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-server</artifactId>
- <version>${jersey.version}</version>
- </dependency>
- <dependency>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api</artifactId>
- <version>${jaxb-api.version}</version>
- <exclusions>
- <exclusion>
- <groupId>javax.xml.stream</groupId>
- <artifactId>stax-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.codehaus.jettison</groupId>
- <artifactId>jettison</artifactId>
- <version>${jettison.version}</version>
- </dependency>
- <dependency>
- <groupId>displaytag</groupId>
- <artifactId>displaytag</artifactId>
- <version>${displaytag.version}</version>
- </dependency>
- <dependency>
- <groupId>displaytag</groupId>
- <artifactId>displaytag-export-poi</artifactId>
- <version>${displaytag.version}</version>
- </dependency>
</dependencies>
-
<profiles>
<!-- JDBC drivers needed for compile, but not site docs
This allows turning off dependency on command line (-P '!jdbc') -->
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/assembly/all.xml
----------------------------------------------------------------------
diff --git a/dcs/src/assembly/all.xml b/dcs/src/assembly/all.xml
index 34f2636..391cf11 100644
--- a/dcs/src/assembly/all.xml
+++ b/dcs/src/assembly/all.xml
@@ -78,10 +78,13 @@
<outputDirectory>/lib</outputDirectory>
<unpack>false</unpack>
<scope>runtime</scope>
- <excludes>
- <exclude>tomcat:jasper-runtime</exclude>
- <exclude>org.trafodion:dcs</exclude>
- </excludes>
+ <includes>
+ <include>displaytag:displaytag</include>
+ <include>org.python:jython-standalone</include>
+ <include>org.slf4j:slf4j-log4j12</include>
+ <include>org.slf4j:slf4j-api</include>
+ <include>org.mortbay.jetty</include>
+ </includes>
<fileMode>0644</fileMode>
<directoryMode>0644</directoryMode>
</dependencySet>
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/java/org/trafodion/dcs/master/DcsMaster.java
----------------------------------------------------------------------
diff --git a/dcs/src/main/java/org/trafodion/dcs/master/DcsMaster.java b/dcs/src/main/java/org/trafodion/dcs/master/DcsMaster.java
index 1c35065..719c3d3 100644
--- a/dcs/src/main/java/org/trafodion/dcs/master/DcsMaster.java
+++ b/dcs/src/main/java/org/trafodion/dcs/master/DcsMaster.java
@@ -61,7 +61,6 @@ import org.trafodion.dcs.util.VersionInfo;
import org.trafodion.dcs.zookeeper.ZkClient;
import org.trafodion.dcs.zookeeper.ZKConfig;
import org.trafodion.dcs.master.listener.ListenerService;
-import org.trafodion.dcs.rest.DcsRest;
public class DcsMaster implements Runnable {
private static final Log LOG = LogFactory.getLog(DcsMaster.class);
@@ -74,7 +73,6 @@ public class DcsMaster implements Runnable {
private int port;
private int portRange;
private InfoServer infoServer;
- private DcsRest restServer;
private String serverName;
private int infoPort;
private long startTime;
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/java/org/trafodion/dcs/master/MasterStatusServlet.java
----------------------------------------------------------------------
diff --git a/dcs/src/main/java/org/trafodion/dcs/master/MasterStatusServlet.java b/dcs/src/main/java/org/trafodion/dcs/master/MasterStatusServlet.java
index 6b02123..4a031b8 100644
--- a/dcs/src/main/java/org/trafodion/dcs/master/MasterStatusServlet.java
+++ b/dcs/src/main/java/org/trafodion/dcs/master/MasterStatusServlet.java
@@ -19,27 +19,7 @@ specific language governing permissions and limitations
under the License.
* @@@ END COPYRIGHT @@@
- */
-/**
- * Copyright 2007 The Apache Software Foundation
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
+*/
package org.trafodion.dcs.master;
import java.io.IOException;
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/java/org/trafodion/dcs/rest/DcsRest.java
----------------------------------------------------------------------
diff --git a/dcs/src/main/java/org/trafodion/dcs/rest/DcsRest.java b/dcs/src/main/java/org/trafodion/dcs/rest/DcsRest.java
deleted file mode 100644
index 046b308..0000000
--- a/dcs/src/main/java/org/trafodion/dcs/rest/DcsRest.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/**
-* @@@ START COPYRIGHT @@@
-
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
-
-* @@@ END COPYRIGHT @@@
- */
-/**
- * Copyright 2011 The Apache Software Foundation
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.trafodion.dcs.rest;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.io.IOException;
-import java.lang.InterruptedException;
-
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.HelpFormatter;
-import org.apache.commons.cli.Options;
-import org.apache.commons.cli.PosixParser;
-import org.apache.commons.cli.ParseException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.net.DNS;
-
-import org.trafodion.dcs.util.DcsConfiguration;
-import org.trafodion.dcs.util.Strings;
-import org.trafodion.dcs.util.VersionInfo;
-
-import org.mortbay.jetty.Connector;
-import org.mortbay.jetty.Server;
-import org.mortbay.jetty.nio.SelectChannelConnector;
-import org.mortbay.jetty.servlet.Context;
-import org.mortbay.jetty.servlet.ServletHolder;
-import org.mortbay.thread.QueuedThreadPool;
-
-import com.sun.jersey.spi.container.servlet.ServletContainer;
-
-public class DcsRest implements Runnable, RestConstants {
- private static final Log LOG = LogFactory.getLog(DcsRest.class.getName());
- private Configuration conf;
- private Thread thrd;
- private String[] args;
- private RESTServlet servlet;
-
- private static void printUsageAndExit(Options options, int exitCode) {
- HelpFormatter formatter = new HelpFormatter();
- formatter.printHelp("bin/dcs rest start", "", options,
- "\nTo run the REST server as a daemon, execute " +
- "bin/dcs-daemon.sh start|stop rest [--infoport <port>] [-p <port>] [-ro]\n", true);
- System.exit(exitCode);
- }
-
- public DcsRest(String[] args) {
- this.args = args;
- conf = DcsConfiguration.create();
-
- Options options = new Options();
- options.addOption("p", "port", true, "Port to bind to [default: 8080]");
- options.addOption("ro", "readonly", false, "Respond only to GET HTTP " +
- "method requests [default: false]");
- options.addOption(null, "infoport", true, "Port for web UI");
-
- try {
- servlet = RESTServlet.getInstance(conf);
- } catch (IOException e) {
- LOG.error("Exception " + e);
- e.printStackTrace();
- }
-
- CommandLine commandLine = null;
- try {
- commandLine = new PosixParser().parse(options, args);
- } catch (ParseException e) {
- LOG.error("Could not parse: ", e);
- printUsageAndExit(options, -1);
- }
-
- // check for user-defined port setting, if so override the conf
- if (commandLine != null && commandLine.hasOption("port")) {
- String val = commandLine.getOptionValue("port");
- servlet.getConfiguration().setInt("dcs.rest.port", Integer.valueOf(val));
- LOG.debug("port set to " + val);
- }
-
- // check if server should only process GET requests, if so override the conf
- if (commandLine != null && commandLine.hasOption("readonly")) {
- servlet.getConfiguration().setBoolean("dcs.rest.readonly", true);
- LOG.debug("readonly set to true");
- }
-
- // check for user-defined info server port setting, if so override the conf
- if (commandLine != null && commandLine.hasOption("infoport")) {
- String val = commandLine.getOptionValue("infoport");
- servlet.getConfiguration().setInt("dcs.rest.info.port", Integer.valueOf(val));
- LOG.debug("Web UI port set to " + val);
- }
-
- @SuppressWarnings("unchecked")
- List<String> remainingArgs = commandLine != null ? commandLine.getArgList() : new ArrayList<String>();
- if (remainingArgs.size() != 1) {
- printUsageAndExit(options, 1);
- }
-
- String command = remainingArgs.get(0);
- if ("start".equals(command)) {
- // continue and start container
- } else if ("stop".equals(command)) {
- System.exit(1);
- } else {
- printUsageAndExit(options, 1);
- }
-
- thrd = new Thread(this);
- thrd.start();
- }
-
- public DcsRest(Configuration conf) {
- try {
- servlet = RESTServlet.getInstance(conf);
- } catch (IOException e) {
- LOG.error("Exception " + e);
- e.printStackTrace();
- return;
- }
-
- thrd = new Thread(this);
- thrd.start();
- }
-
- public void run() {
- VersionInfo.logVersion();
-
- // set up the Jersey servlet container for Jetty
- ServletHolder sh = new ServletHolder(ServletContainer.class);
- sh.setInitParameter(
- "com.sun.jersey.config.property.resourceConfigClass",
- ResourceConfig.class.getCanonicalName());
- sh.setInitParameter("com.sun.jersey.config.property.packages","org.trafodion.dcs.rest");
-
- // set up Jetty and run the embedded server
- Server server = new Server();
-
- Connector connector = new SelectChannelConnector();
- connector.setPort(servlet.getConfiguration().getInt("dcs.rest.port", 8080));
- connector.setHost(servlet.getConfiguration().get("dcs.rest.host", "0.0.0.0"));
-
- server.addConnector(connector);
-
- // Set the default max thread number to 100 to limit
- // the number of concurrent requests so that REST server doesn't OOM easily.
- // Jetty set the default max thread number to 250, if we don't set it.
- //
- // Our default min thread number 2 is the same as that used by Jetty.
- int maxThreads = servlet.getConfiguration().getInt("dcs.rest.threads.max", 100);
- int minThreads = servlet.getConfiguration().getInt("dcs.rest.threads.min", 2);
- QueuedThreadPool threadPool = new QueuedThreadPool(maxThreads);
- threadPool.setMinThreads(minThreads);
- server.setThreadPool(threadPool);
- server.setSendServerVersion(false);
- server.setSendDateHeader(false);
- server.setStopAtShutdown(true);
-
- Context context = new Context(server, "/", Context.SESSIONS);
- context.addServlet(sh, "/*");
-
- try {
- server.start();
- server.join();
- } catch (InterruptedException e) {
- LOG.error("InterruptedException " + e);
- } catch (Exception e) {
- LOG.error("Exception " + e);
- }
- }
-
- public static void main(String[] args) throws Exception {
- DcsRest server = new DcsRest(args);
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/java/org/trafodion/dcs/rest/GetStatusResponse.java
----------------------------------------------------------------------
diff --git a/dcs/src/main/java/org/trafodion/dcs/rest/GetStatusResponse.java b/dcs/src/main/java/org/trafodion/dcs/rest/GetStatusResponse.java
deleted file mode 100644
index c8ee6c4..0000000
--- a/dcs/src/main/java/org/trafodion/dcs/rest/GetStatusResponse.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
-* @@@ START COPYRIGHT @@@
-
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
-
-* @@@ END COPYRIGHT @@@
- */
-package org.trafodion.dcs.rest;
-
-import java.io.IOException;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlElement;
-
-@XmlRootElement
-public class GetStatusResponse {
- private String workloadId;
-
- public GetStatusResponse(){
- };
-
- public GetStatusResponse(String value){
- workloadId = value;
- };
-
- @XmlElement
- public String getWorkloadId() {
- return workloadId;
- }
-
- public void setWorkloadId(String value) {
- this.workloadId = value;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/java/org/trafodion/dcs/rest/RESTServlet.java
----------------------------------------------------------------------
diff --git a/dcs/src/main/java/org/trafodion/dcs/rest/RESTServlet.java b/dcs/src/main/java/org/trafodion/dcs/rest/RESTServlet.java
deleted file mode 100644
index 13016b4..0000000
--- a/dcs/src/main/java/org/trafodion/dcs/rest/RESTServlet.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/**
-* @@@ START COPYRIGHT @@@
-
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
-
-* @@@ END COPYRIGHT @@@
- */
-/**
- * Copyright 2007 The Apache Software Foundation
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.trafodion.dcs.rest;
-
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.util.StringTokenizer;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.trafodion.dcs.Constants;
-import org.trafodion.dcs.rest.ServerConnector;
-import org.trafodion.dcs.rest.RestConstants;
-import org.trafodion.dcs.zookeeper.ZkClient;
-
-import org.apache.zookeeper.KeeperException;
-import org.apache.zookeeper.data.Stat;
-import org.apache.zookeeper.ZooDefs;
-
-import org.apache.hadoop.conf.Configuration;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-/**
- * Singleton class encapsulating global REST servlet state and functions.
- */
-public class RESTServlet implements RestConstants {
- private static final Log LOG = LogFactory.getLog(RESTServlet.class);
- private static RESTServlet INSTANCE;
- private final Configuration conf;
- private static ZkClient zkc;
- private String parentZnode;
- private Map<String, ServerConnector> m = new HashMap<String, ServerConnector>();
-
- /**
- * @return the RESTServlet singleton instance
- * @throws IOException
- */
- public synchronized static RESTServlet getInstance()
- throws IOException {
- assert(INSTANCE != null);
- return INSTANCE;
- }
-
- /**
- * @param conf Existing configuration to use in rest servlet
- * @return the RESTServlet singleton instance
- * @throws IOException
- */
- public synchronized static RESTServlet getInstance(Configuration conf)
- throws IOException {
- if (INSTANCE == null) {
- INSTANCE = new RESTServlet(conf);
- }
- return INSTANCE;
- }
-
- public ZkClient getZk(){
- return this.zkc;
- }
-
- public String getParentZnode(){
- return this.parentZnode;
- }
-
- public synchronized static void stop() {
- if (INSTANCE != null) INSTANCE = null;
- }
-
- /**
- * Constructor with existing configuration
- * @param conf existing configuration
- * @throws IOException.
- */
- RESTServlet(Configuration conf) throws IOException {
- this.conf = conf;
- this.parentZnode = conf.get(Constants.ZOOKEEPER_ZNODE_PARENT,Constants.DEFAULT_ZOOKEEPER_ZNODE_PARENT);
-
- }
-
- private void openZk() throws IOException {
- try {
- if(zkc == null)
- zkc = new ZkClient();//CTRL-C...set sessionTimeout,maxRetries,retryIntervalMillis
- zkc.connect();
- } catch (InterruptedException e) {
- LOG.error(e);
- }
- }
-
- public synchronized List<String> getChildren(String znode) throws IOException {
- List<String> s = null;
-
- try {
- openZk();
- s = zkc.getChildren(znode,null);
- } catch (InterruptedException e) {
- LOG.error(e);
- } catch (KeeperException e) {
- LOG.error(e);
- } catch (NullPointerException e) {
- LOG.error(e);
- }
-
- return s;
- }
-
- public synchronized List<String> getMaster() throws IOException {
- return getChildren(parentZnode + Constants.DEFAULT_ZOOKEEPER_ZNODE_MASTER);
- }
- public synchronized List<String> getRunning() throws IOException {
- return getChildren(parentZnode + Constants.DEFAULT_ZOOKEEPER_ZNODE_SERVERS_RUNNING);
- }
- public synchronized List<String> getRegistered() throws IOException {
- return getChildren(parentZnode + Constants.DEFAULT_ZOOKEEPER_ZNODE_SERVERS_REGISTERED);
- }
-
- Configuration getConfiguration() {
- return conf;
- }
-
- /**
- * Helper method to determine if server should
- * only respond to GET HTTP method requests.
- * @return boolean for server read-only state
- */
- boolean isReadOnly() {
- return getConfiguration().getBoolean("dcs.rest.readonly", false);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/java/org/trafodion/dcs/rest/ResourceBase.java
----------------------------------------------------------------------
diff --git a/dcs/src/main/java/org/trafodion/dcs/rest/ResourceBase.java b/dcs/src/main/java/org/trafodion/dcs/rest/ResourceBase.java
deleted file mode 100644
index 00d64eb..0000000
--- a/dcs/src/main/java/org/trafodion/dcs/rest/ResourceBase.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
-* @@@ START COPYRIGHT @@@
-
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
-
-* @@@ END COPYRIGHT @@@
- */
-package org.trafodion.dcs.rest;
-
-import java.io.IOException;
-
-public class ResourceBase implements RestConstants {
-
- RESTServlet servlet;
-
- public ResourceBase() throws IOException {
- servlet = RESTServlet.getInstance();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/java/org/trafodion/dcs/rest/ResourceConfig.java
----------------------------------------------------------------------
diff --git a/dcs/src/main/java/org/trafodion/dcs/rest/ResourceConfig.java b/dcs/src/main/java/org/trafodion/dcs/rest/ResourceConfig.java
deleted file mode 100644
index 32a211e..0000000
--- a/dcs/src/main/java/org/trafodion/dcs/rest/ResourceConfig.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
-* @@@ START COPYRIGHT @@@
-
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
-
-* @@@ END COPYRIGHT @@@
- */
-package org.trafodion.dcs.rest;
-
-import com.sun.jersey.api.core.PackagesResourceConfig;
-
-public class ResourceConfig extends PackagesResourceConfig {
- public ResourceConfig() {
- super("org.trafodion.dcs.rest");
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/java/org/trafodion/dcs/rest/RestConstants.java
----------------------------------------------------------------------
diff --git a/dcs/src/main/java/org/trafodion/dcs/rest/RestConstants.java b/dcs/src/main/java/org/trafodion/dcs/rest/RestConstants.java
deleted file mode 100644
index 1eee4df..0000000
--- a/dcs/src/main/java/org/trafodion/dcs/rest/RestConstants.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
-* @@@ START COPYRIGHT @@@
-
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
-
-* @@@ END COPYRIGHT @@@
- */
-/**
- * Copyright 2007 The Apache Software Foundation
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.trafodion.dcs.rest;
-
-/**
- * Common constants for org.trafodion.dcs.rest
- */
-public interface RestConstants {
- public static final String VERSION_STRING = "0.0.2";
-
- public static final int DEFAULT_MAX_AGE = 60 * 60 * 4; // 4 hours
-
- public static final int DEFAULT_LISTEN_PORT = 8080;
-
- public static final String MIMETYPE_TEXT = "text/plain";
- public static final String MIMETYPE_HTML = "text/html";
- public static final String MIMETYPE_XML = "text/xml";
- public static final String MIMETYPE_BINARY = "application/octet-stream";
- public static final String MIMETYPE_PROTOBUF = "application/x-protobuf";
- public static final String MIMETYPE_PROTOBUF_IETF = "application/protobuf";
- public static final String MIMETYPE_JSON = "application/json";
-
- public static final String CRLF = "\r\n";
-}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/java/org/trafodion/dcs/rest/RootResource.java
----------------------------------------------------------------------
diff --git a/dcs/src/main/java/org/trafodion/dcs/rest/RootResource.java b/dcs/src/main/java/org/trafodion/dcs/rest/RootResource.java
deleted file mode 100644
index eb9d0dc..0000000
--- a/dcs/src/main/java/org/trafodion/dcs/rest/RootResource.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
-* @@@ START COPYRIGHT @@@
-
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
-
-* @@@ END COPYRIGHT @@@
- */
-package org.trafodion.dcs.rest;
-
-import java.io.*;
-import java.util.*;
-
-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.core.CacheControl;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
-import javax.ws.rs.core.Response.ResponseBuilder;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.trafodion.dcs.Constants;
-import org.trafodion.dcs.util.Bytes;
-import org.trafodion.dcs.rest.RestConstants;
-
-@Path("/")
-public class RootResource extends ResourceBase {
- private static final Log LOG = LogFactory.getLog(RootResource.class);
-
- static CacheControl cacheControl;
- static {
- cacheControl = new CacheControl();
- cacheControl.setNoCache(true);
- cacheControl.setNoTransform(false);
- }
-
- public RootResource() throws IOException {
- super();
- }
-
- @GET
- @Produces({MIMETYPE_TEXT, MIMETYPE_XML, MIMETYPE_JSON})
- public Response get(final @Context UriInfo uriInfo) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("GET " + uriInfo.getAbsolutePath());
- }
-
- try {
- return new WorkloadResource().get(uriInfo);
- } catch (IOException e) {
- return Response.status(Response.Status.SERVICE_UNAVAILABLE)
- .type(MIMETYPE_TEXT).entity("Unavailable" + CRLF)
- .build();
- }
-
- }
-
- @Path("/v1/servers")
- public ServerResource getServerResource() throws IOException {
- //To test:
- //curl -v -X GET -H "Accept: application/json" http://<DcsMaster IP address>:8080/v1/servers
- //
- return new ServerResource();
- }
-
- @Path("/v1/workloads")
- public WorkloadResource getWorkloadResource() throws IOException {
- //To test:
- //curl -v -X GET -H "Accept: application/json" http://<DcsMaster IP address>:8080/v1/workloads
- //
- return new WorkloadResource();
- }
-
- @Path("/v1/version")
- public VersionResource getVersionResource() throws IOException {
- //To test:
- //curl -v -X GET -H "Accept: application/json" http://<DcsMaster IP address>:8080/v1/version
- //
- return new VersionResource();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/java/org/trafodion/dcs/rest/ServerConnector.java
----------------------------------------------------------------------
diff --git a/dcs/src/main/java/org/trafodion/dcs/rest/ServerConnector.java b/dcs/src/main/java/org/trafodion/dcs/rest/ServerConnector.java
deleted file mode 100644
index 35cafd9..0000000
--- a/dcs/src/main/java/org/trafodion/dcs/rest/ServerConnector.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
-* @@@ START COPYRIGHT @@@
-
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
-
-* @@@ END COPYRIGHT @@@
- */
-package org.trafodion.dcs.rest;
-
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.util.StringTokenizer;
-import java.util.List;
-import java.util.Iterator;
-import java.util.HashMap;
-import java.util.Map;
-
-//import org.apache.avro.ipc.NettyTransceiver;
-//import org.apache.avro.ipc.Transceiver;
-//import org.apache.avro.ipc.specific.SpecificRequestor;
-//import org.apache.avro.AvroRemoteException;
-
-import org.trafodion.dcs.Constants;
-import org.trafodion.dcs.rest.RestConstants;
-import org.trafodion.dcs.zookeeper.ZkClient;
-
-import org.apache.zookeeper.KeeperException;
-import org.apache.zookeeper.data.Stat;
-import org.apache.zookeeper.ZooDefs;
-
-import org.apache.hadoop.conf.Configuration;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-
-public class ServerConnector {
- private static final Log LOG = LogFactory.getLog(ServerConnector.class);
-// private Transceiver transceiver;
-// private Workload client;
-// private WorkloadListRequest request;
-/*
- public ServerConnector(String ipAddr,int port) throws IOException {
- try {
- transceiver = new NettyTransceiver(new InetSocketAddress(ipAddr,port));
- client = SpecificRequestor.getClient(Workload.class, transceiver);
-// request = WorkloadListRequest.newBuilder().build();
-
- } catch (AvroRemoteException e) {
- LOG.error(e);
- }
- }
-
- public WorkloadListResponse getWorkloadListResponse() {
- WorkloadListResponse response = null;
- try {
- response = client.list(request);
- } catch (AvroRemoteException e) {
- LOG.error(e);
- }
- return response;
- }
-*/
-}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/java/org/trafodion/dcs/rest/ServerResource.java
----------------------------------------------------------------------
diff --git a/dcs/src/main/java/org/trafodion/dcs/rest/ServerResource.java b/dcs/src/main/java/org/trafodion/dcs/rest/ServerResource.java
deleted file mode 100644
index 5a39050..0000000
--- a/dcs/src/main/java/org/trafodion/dcs/rest/ServerResource.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/**********************************************************************
-* @@@ START COPYRIGHT @@@
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-* @@@ END COPYRIGHT @@@
-**********************************************************************/
-
-package org.trafodion.dcs.rest;
-
-import java.io.*;
-import java.util.*;
-
-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.core.CacheControl;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
-import javax.ws.rs.core.Response.ResponseBuilder;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.apache.zookeeper.ZooDefs;
-import org.apache.zookeeper.data.Stat;
-
-import org.trafodion.dcs.Constants;
-import org.trafodion.dcs.util.Bytes;
-import org.trafodion.dcs.zookeeper.ZkClient;
-import org.trafodion.dcs.rest.RestConstants;
-import org.trafodion.dcs.rest.model.ServerModel;
-
-public class ServerResource extends ResourceBase {
- private static final Log LOG =
- LogFactory.getLog(ServerResource.class);
-
- static CacheControl cacheControl;
- static {
- cacheControl = new CacheControl();
- cacheControl.setNoCache(true);
- cacheControl.setNoTransform(false);
- }
-
- /**
-* @@@ START COPYRIGHT @@@
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
-* @@@ END COPYRIGHT @@@
- */
- public ServerResource() throws IOException {
- super();
- }
-
- @GET
- @Produces({MIMETYPE_TEXT, MIMETYPE_XML, MIMETYPE_JSON})
- public Response get(final @Context UriInfo uriInfo) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("GET " + uriInfo.getAbsolutePath());
- }
-
- try {
- List<String> master = servlet.getMaster();
- List<String> running = servlet.getRunning();
- List<String> registered = servlet.getRegistered();
-
- ZkClient zkc = servlet.getZk();
- Stat stat = null;
-
- ServerModel model = new ServerModel();
-
- String data = null;
-
- if(master != null){
- for(String znode: master) {
- data = null;
- try {
- data = Bytes.toString(zkc.getData(servlet.getParentZnode() + Constants.DEFAULT_ZOOKEEPER_ZNODE_MASTER + "/" + znode, false, stat));
- } catch (Exception e) {
- LOG.error(e);
- }
-
- ServerModel.DcsMaster dcsMaster = model.addDcsMaster(znode,data);
-
- if(running != null){
- Collections.sort(running);
- data = null;
- for(String znodeRun: running) {
- try {
- data = Bytes.toString(zkc.getData(servlet.getParentZnode() + Constants.DEFAULT_ZOOKEEPER_ZNODE_SERVERS_RUNNING + "/" + znodeRun, false, stat));
- } catch (Exception e) {
- LOG.error(e);
- }
-
- ServerModel.DcsServer dcsServer = dcsMaster.addDcsServer(znodeRun,data);
-
- if(registered != null){
- Collections.sort(registered);
- data = null;
- for(String znodeReg: registered) {
- try {
- data = Bytes.toString(zkc.getData(servlet.getParentZnode() + Constants.DEFAULT_ZOOKEEPER_ZNODE_SERVERS_REGISTERED + "/" + znodeReg, false, stat));
- } catch (Exception e) {
- LOG.error(e);
- }
-
- dcsServer.addTrafodionServer(znodeReg,data);
- }
- }
- }
- }
- }
- }
-
- ResponseBuilder response = Response.ok(model);
- response.cacheControl(cacheControl);
- return response.build();
- } catch (IOException e) {
- return Response.status(Response.Status.SERVICE_UNAVAILABLE)
- .type(MIMETYPE_TEXT).entity("Unavailable" + CRLF)
- .build();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/java/org/trafodion/dcs/rest/VersionResource.java
----------------------------------------------------------------------
diff --git a/dcs/src/main/java/org/trafodion/dcs/rest/VersionResource.java b/dcs/src/main/java/org/trafodion/dcs/rest/VersionResource.java
deleted file mode 100644
index caa7985..0000000
--- a/dcs/src/main/java/org/trafodion/dcs/rest/VersionResource.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/**********************************************************************
-* @@@ START COPYRIGHT @@@
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-* @@@ END COPYRIGHT @@@
-**********************************************************************/
-
-package org.trafodion.dcs.rest;
-
-import java.io.IOException;
-
-import javax.servlet.ServletContext;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.CacheControl;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
-import javax.ws.rs.core.Response.ResponseBuilder;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.trafodion.dcs.rest.model.VersionModel;
-
-/**
-* @@@ START COPYRIGHT @@@
-
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
-
-* @@@ END COPYRIGHT @@@
- */
-public class VersionResource extends ResourceBase {
-
- private static final Log LOG = LogFactory.getLog(VersionResource.class);
-
- static CacheControl cacheControl;
- static {
- cacheControl = new CacheControl();
- cacheControl.setNoCache(true);
- cacheControl.setNoTransform(false);
- }
-
- /**
- * Constructor
- * @throws IOException
- */
- public VersionResource() throws IOException {
- super();
- }
-
- /**
- * Build a response for a version request.
- * @param context servlet context
- * @param uriInfo (JAX-RS context variable) request URL
- * @return a response for a version request
- */
-
- @GET
- @Produces({MIMETYPE_TEXT, MIMETYPE_XML, MIMETYPE_JSON})
- public Response get(final @Context ServletContext context,
- final @Context UriInfo uriInfo) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("GET " + uriInfo.getAbsolutePath());
- }
- //servlet.getMetrics().incrementRequests(1);
- ResponseBuilder response = Response.ok(new VersionModel(context));
- response.cacheControl(cacheControl);
- //servlet.getMetrics().incrementSucessfulGetRequests(1);
- return response.build();
- }
-
- /**
- * Dispatch to StorageClusterVersionResource
- */
-/*
- @Path("cluster")
- public StorageClusterVersionResource getClusterVersionResource()
- throws IOException {
- return new StorageClusterVersionResource();
- }
-*/
- /**
- * Dispatch <tt>/version/rest</tt> to self.
- */
- @Path("rest")
- public VersionResource getVersionResource() {
- return this;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/java/org/trafodion/dcs/rest/WorkloadResource.java
----------------------------------------------------------------------
diff --git a/dcs/src/main/java/org/trafodion/dcs/rest/WorkloadResource.java b/dcs/src/main/java/org/trafodion/dcs/rest/WorkloadResource.java
deleted file mode 100644
index 6a17110..0000000
--- a/dcs/src/main/java/org/trafodion/dcs/rest/WorkloadResource.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/**********************************************************************
-* @@@ START COPYRIGHT @@@
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-* @@@ END COPYRIGHT @@@
-**********************************************************************/
-package org.trafodion.dcs.rest;
-
-import java.io.*;
-import java.util.*;
-
-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.core.CacheControl;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
-import javax.ws.rs.core.Response.ResponseBuilder;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.trafodion.dcs.Constants;
-import org.trafodion.dcs.util.Bytes;
-import org.trafodion.dcs.script.ScriptManager;
-import org.trafodion.dcs.script.ScriptContext;
-import org.trafodion.dcs.rest.model.WorkloadListModel;
-import org.trafodion.dcs.rest.model.WorkloadModel;
-
-import org.codehaus.jettison.json.JSONArray;
-import org.codehaus.jettison.json.JSONException;
-import org.codehaus.jettison.json.JSONObject;
-
-public class WorkloadResource extends ResourceBase {
- private static final Log LOG =
- LogFactory.getLog(WorkloadResource.class);
-
- static CacheControl cacheControl;
- static {
- cacheControl = new CacheControl();
- cacheControl.setNoCache(true);
- cacheControl.setNoTransform(false);
- }
-
- /**
-* @@@ START COPYRIGHT @@@
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
-* @@@ END COPYRIGHT @@@
- */
- public WorkloadResource() throws IOException {
- super();
-
- }
-
- @GET
- @Produces({MIMETYPE_TEXT, MIMETYPE_XML, MIMETYPE_JSON})
- public Response get(final @Context UriInfo uriInfo) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("GET " + uriInfo.getAbsolutePath());
- }
-
- try {
-// ScriptContext scriptContext = new ScriptContext();
-// scriptContext.setScriptName(Constants.JDBCT2UTIL_SCRIPT_NAME);
-// scriptContext.setCommand(Constants.TRAFODION_REPOS_METRIC_SESSION_TABLE);
-
- try {
-// ScriptManager.getInstance().runScript(scriptContext);//This will block while script is running
- } catch (Exception e) {
- e.printStackTrace();
- throw new IOException(e);
- }
-
-// StringBuilder sb = new StringBuilder();
-// sb.append("exit code [" + scriptContext.getExitCode() + "]");
-// if(! scriptContext.getStdOut().toString().isEmpty())
-// sb.append(", stdout [" + scriptContext.getStdOut().toString() + "]");
-// if(! scriptContext.getStdErr().toString().isEmpty())
-// sb.append(", stderr [" + scriptContext.getStdErr().toString() + "]");
-// LOG.info(sb.toString());
-
- JSONArray workloadList = null;
-
-// try {
-// if(scriptContext.getExitCode() == 0 && (! scriptContext.getStdOut().toString().isEmpty())) {
-// workloadList = new JSONArray(scriptContext.getStdOut().toString());
-// }
-// } catch (Exception e) {
-// e.printStackTrace();
-// LOG.error(e.getMessage());
-// throw new IOException(e);
-// }
-
- ResponseBuilder response = Response.ok(workloadList);
- response.cacheControl(cacheControl);
- return response.build();
- } catch (IOException e) {
- return Response.status(Response.Status.SERVICE_UNAVAILABLE)
- .type(MIMETYPE_TEXT).entity("Unavailable" + CRLF)
- .build();
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/java/org/trafodion/dcs/rest/client/Client.java
----------------------------------------------------------------------
diff --git a/dcs/src/main/java/org/trafodion/dcs/rest/client/Client.java b/dcs/src/main/java/org/trafodion/dcs/rest/client/Client.java
deleted file mode 100644
index d21eb3a..0000000
--- a/dcs/src/main/java/org/trafodion/dcs/rest/client/Client.java
+++ /dev/null
@@ -1,504 +0,0 @@
-/**
-* @@@ START COPYRIGHT @@@
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-* @@@ END COPYRIGHT @@@
- */
-
-package org.trafodion.dcs.rest.client;
-
-import java.io.IOException;
-import java.util.Collections;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.commons.httpclient.Header;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpMethod;
-import org.apache.commons.httpclient.HttpVersion;
-import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
-import org.apache.commons.httpclient.URI;
-import org.apache.commons.httpclient.methods.ByteArrayRequestEntity;
-import org.apache.commons.httpclient.methods.DeleteMethod;
-import org.apache.commons.httpclient.methods.GetMethod;
-import org.apache.commons.httpclient.methods.HeadMethod;
-import org.apache.commons.httpclient.methods.PostMethod;
-import org.apache.commons.httpclient.methods.PutMethod;
-import org.apache.commons.httpclient.params.HttpClientParams;
-import org.apache.commons.httpclient.params.HttpConnectionManagerParams;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/**
- * A wrapper around HttpClient which provides some useful function and
- * semantics for interacting with the REST gateway.
- */
-public class Client {
- public static final Header[] EMPTY_HEADER_ARRAY = new Header[0];
-
- private static final Log LOG = LogFactory.getLog(Client.class);
-
- private HttpClient httpClient;
- private Cluster cluster;
-
- private Map<String, String> extraHeaders;
-
- /**
- * Default Constructor
- */
- public Client() {
- this(null);
- }
-
- /**
- * Constructor
- * @param cluster the cluster definition
- */
- public Client(Cluster cluster) {
- this.cluster = cluster;
- MultiThreadedHttpConnectionManager manager =
- new MultiThreadedHttpConnectionManager();
- HttpConnectionManagerParams managerParams = manager.getParams();
- managerParams.setConnectionTimeout(2000); // 2 s
- managerParams.setDefaultMaxConnectionsPerHost(10);
- managerParams.setMaxTotalConnections(100);
- extraHeaders = new ConcurrentHashMap<String, String>();
- this.httpClient = new HttpClient(manager);
- HttpClientParams clientParams = httpClient.getParams();
- clientParams.setVersion(HttpVersion.HTTP_1_1);
- }
-
- /**
- * Shut down the client. Close any open persistent connections.
- */
- public void shutdown() {
- MultiThreadedHttpConnectionManager manager =
- (MultiThreadedHttpConnectionManager) httpClient.getHttpConnectionManager();
- manager.shutdown();
- }
-
- /**
- * @return the wrapped HttpClient
- */
- public HttpClient getHttpClient() {
- return httpClient;
- }
-
- /**
- * Add extra headers. These extra headers will be applied to all http
- * methods before they are removed. If any header is not used any more,
- * client needs to remove it explicitly.
- */
- public void addExtraHeader(final String name, final String value) {
- extraHeaders.put(name, value);
- }
-
- /**
- * Get an extra header value.
- */
- public String getExtraHeader(final String name) {
- return extraHeaders.get(name);
- }
-
- /**
- * Get all extra headers (read-only).
- */
- public Map<String, String> getExtraHeaders() {
- return Collections.unmodifiableMap(extraHeaders);
- }
-
- /**
- * Remove an extra header.
- */
- public void removeExtraHeader(final String name) {
- extraHeaders.remove(name);
- }
-
- /**
- * Execute a transaction method given only the path. Will select at random
- * one of the members of the supplied cluster definition and iterate through
- * the list until a transaction can be successfully completed. The
- * definition of success here is a complete HTTP transaction, irrespective
- * of result code.
- * @param cluster the cluster definition
- * @param method the transaction method
- * @param headers HTTP header values to send
- * @param path the properly urlencoded path
- * @return the HTTP response code
- * @throws IOException
- */
- public int executePathOnly(Cluster cluster, HttpMethod method,
- Header[] headers, String path) throws IOException {
- IOException lastException;
- if (cluster.nodes.size() < 1) {
- throw new IOException("Cluster is empty");
- }
- int start = (int)Math.round((cluster.nodes.size() - 1) * Math.random());
- int i = start;
- do {
- cluster.lastHost = cluster.nodes.get(i);
- try {
- StringBuilder sb = new StringBuilder();
- sb.append("http://");
- sb.append(cluster.lastHost);
- sb.append(path);
- URI uri = new URI(sb.toString(), true);
- return executeURI(method, headers, uri.toString());
- } catch (IOException e) {
- lastException = e;
- }
- } while (++i != start && i < cluster.nodes.size());
- throw lastException;
- }
-
- /**
- * Execute a transaction method given a complete URI.
- * @param method the transaction method
- * @param headers HTTP header values to send
- * @param uri a properly urlencoded URI
- * @return the HTTP response code
- * @throws IOException
- */
- public int executeURI(HttpMethod method, Header[] headers, String uri)
- throws IOException {
- method.setURI(new URI(uri, true));
- for (Map.Entry<String, String> e: extraHeaders.entrySet()) {
- method.addRequestHeader(e.getKey(), e.getValue());
- }
- if (headers != null) {
- for (Header header: headers) {
- method.addRequestHeader(header);
- }
- }
- long startTime = System.currentTimeMillis();
- int code = httpClient.executeMethod(method);
- long endTime = System.currentTimeMillis();
- if (LOG.isDebugEnabled()) {
- LOG.debug(method.getName() + " " + uri + " " + code + " " +
- method.getStatusText() + " in " + (endTime - startTime) + " ms");
- }
- return code;
- }
-
- /**
- * Execute a transaction method. Will call either <tt>executePathOnly</tt>
- * or <tt>executeURI</tt> depending on whether a path only is supplied in
- * 'path', or if a complete URI is passed instead, respectively.
- * @param cluster the cluster definition
- * @param method the HTTP method
- * @param headers HTTP header values to send
- * @param path the properly urlencoded path or URI
- * @return the HTTP response code
- * @throws IOException
- */
- public int execute(Cluster cluster, HttpMethod method, Header[] headers,
- String path) throws IOException {
- if (path.startsWith("/")) {
- return executePathOnly(cluster, method, headers, path);
- }
- return executeURI(method, headers, path);
- }
-
- /**
- * @return the cluster definition
- */
- public Cluster getCluster() {
- return cluster;
- }
-
- /**
- * @param cluster the cluster definition
- */
- public void setCluster(Cluster cluster) {
- this.cluster = cluster;
- }
-
- /**
- * Send a HEAD request
- * @param path the path or URI
- * @return a Response object with response detail
- * @throws IOException
- */
- public Response head(String path) throws IOException {
- return head(cluster, path, null);
- }
-
- /**
- * Send a HEAD request
- * @param cluster the cluster definition
- * @param path the path or URI
- * @param headers the HTTP headers to include in the request
- * @return a Response object with response detail
- * @throws IOException
- */
- public Response head(Cluster cluster, String path, Header[] headers)
- throws IOException {
- HeadMethod method = new HeadMethod();
- try {
- int code = execute(cluster, method, null, path);
- headers = method.getResponseHeaders();
- return new Response(code, headers, null);
- } finally {
- method.releaseConnection();
- }
- }
-
- /**
- * Send a GET request
- * @param path the path or URI
- * @return a Response object with response detail
- * @throws IOException
- */
- public Response get(String path) throws IOException {
- return get(cluster, path);
- }
-
- /**
- * Send a GET request
- * @param cluster the cluster definition
- * @param path the path or URI
- * @return a Response object with response detail
- * @throws IOException
- */
- public Response get(Cluster cluster, String path) throws IOException {
- return get(cluster, path, EMPTY_HEADER_ARRAY);
- }
-
- /**
- * Send a GET request
- * @param path the path or URI
- * @param accept Accept header value
- * @return a Response object with response detail
- * @throws IOException
- */
- public Response get(String path, String accept) throws IOException {
- return get(cluster, path, accept);
- }
-
- /**
- * Send a GET request
- * @param cluster the cluster definition
- * @param path the path or URI
- * @param accept Accept header value
- * @return a Response object with response detail
- * @throws IOException
- */
- public Response get(Cluster cluster, String path, String accept)
- throws IOException {
- Header[] headers = new Header[1];
- headers[0] = new Header("Accept", accept);
- return get(cluster, path, headers);
- }
-
- /**
- * Send a GET request
- * @param path the path or URI
- * @param headers the HTTP headers to include in the request,
- * <tt>Accept</tt> must be supplied
- * @return a Response object with response detail
- * @throws IOException
- */
- public Response get(String path, Header[] headers) throws IOException {
- return get(cluster, path, headers);
- }
-
- /**
- * Send a GET request
- * @param c the cluster definition
- * @param path the path or URI
- * @param headers the HTTP headers to include in the request
- * @return a Response object with response detail
- * @throws IOException
- */
- public Response get(Cluster c, String path, Header[] headers)
- throws IOException {
- GetMethod method = new GetMethod();
- try {
- int code = execute(c, method, headers, path);
- headers = method.getResponseHeaders();
- byte[] body = method.getResponseBody();
- return new Response(code, headers, body);
- } finally {
- method.releaseConnection();
- }
- }
-
- /**
- * Send a PUT request
- * @param path the path or URI
- * @param contentType the content MIME type
- * @param content the content bytes
- * @return a Response object with response detail
- * @throws IOException
- */
- public Response put(String path, String contentType, byte[] content)
- throws IOException {
- return put(cluster, path, contentType, content);
- }
-
- /**
- * Send a PUT request
- * @param cluster the cluster definition
- * @param path the path or URI
- * @param contentType the content MIME type
- * @param content the content bytes
- * @return a Response object with response detail
- * @throws IOException
- */
- public Response put(Cluster cluster, String path, String contentType,
- byte[] content) throws IOException {
- Header[] headers = new Header[1];
- headers[0] = new Header("Content-Type", contentType);
- return put(cluster, path, headers, content);
- }
-
- /**
- * Send a PUT request
- * @param path the path or URI
- * @param headers the HTTP headers to include, <tt>Content-Type</tt> must be
- * supplied
- * @param content the content bytes
- * @return a Response object with response detail
- * @throws IOException
- */
- public Response put(String path, Header[] headers, byte[] content)
- throws IOException {
- return put(cluster, path, headers, content);
- }
-
- /**
- * Send a PUT request
- * @param cluster the cluster definition
- * @param path the path or URI
- * @param headers the HTTP headers to include, <tt>Content-Type</tt> must be
- * supplied
- * @param content the content bytes
- * @return a Response object with response detail
- * @throws IOException
- */
- public Response put(Cluster cluster, String path, Header[] headers,
- byte[] content) throws IOException {
- PutMethod method = new PutMethod();
- try {
- method.setRequestEntity(new ByteArrayRequestEntity(content));
- int code = execute(cluster, method, headers, path);
- headers = method.getResponseHeaders();
- content = method.getResponseBody();
- return new Response(code, headers, content);
- } finally {
- method.releaseConnection();
- }
- }
-
- /**
- * Send a POST request
- * @param path the path or URI
- * @param contentType the content MIME type
- * @param content the content bytes
- * @return a Response object with response detail
- * @throws IOException
- */
- public Response post(String path, String contentType, byte[] content)
- throws IOException {
- return post(cluster, path, contentType, content);
- }
-
- /**
- * Send a POST request
- * @param cluster the cluster definition
- * @param path the path or URI
- * @param contentType the content MIME type
- * @param content the content bytes
- * @return a Response object with response detail
- * @throws IOException
- */
- public Response post(Cluster cluster, String path, String contentType,
- byte[] content) throws IOException {
- Header[] headers = new Header[1];
- headers[0] = new Header("Content-Type", contentType);
- return post(cluster, path, headers, content);
- }
-
- /**
- * Send a POST request
- * @param path the path or URI
- * @param headers the HTTP headers to include, <tt>Content-Type</tt> must be
- * supplied
- * @param content the content bytes
- * @return a Response object with response detail
- * @throws IOException
- */
- public Response post(String path, Header[] headers, byte[] content)
- throws IOException {
- return post(cluster, path, headers, content);
- }
-
- /**
- * Send a POST request
- * @param cluster the cluster definition
- * @param path the path or URI
- * @param headers the HTTP headers to include, <tt>Content-Type</tt> must be
- * supplied
- * @param content the content bytes
- * @return a Response object with response detail
- * @throws IOException
- */
- public Response post(Cluster cluster, String path, Header[] headers,
- byte[] content) throws IOException {
- PostMethod method = new PostMethod();
- try {
- method.setRequestEntity(new ByteArrayRequestEntity(content));
- int code = execute(cluster, method, headers, path);
- headers = method.getResponseHeaders();
- content = method.getResponseBody();
- return new Response(code, headers, content);
- } finally {
- method.releaseConnection();
- }
- }
-
- /**
- * Send a DELETE request
- * @param path the path or URI
- * @return a Response object with response detail
- * @throws IOException
- */
- public Response delete(String path) throws IOException {
- return delete(cluster, path);
- }
-
- /**
- * Send a DELETE request
- * @param cluster the cluster definition
- * @param path the path or URI
- * @return a Response object with response detail
- * @throws IOException
- */
- public Response delete(Cluster cluster, String path) throws IOException {
- DeleteMethod method = new DeleteMethod();
- try {
- int code = execute(cluster, method, null, path);
- Header[] headers = method.getResponseHeaders();
- byte[] content = method.getResponseBody();
- return new Response(code, headers, content);
- } finally {
- method.releaseConnection();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/java/org/trafodion/dcs/rest/client/Cluster.java
----------------------------------------------------------------------
diff --git a/dcs/src/main/java/org/trafodion/dcs/rest/client/Cluster.java b/dcs/src/main/java/org/trafodion/dcs/rest/client/Cluster.java
deleted file mode 100644
index 51721d6..0000000
--- a/dcs/src/main/java/org/trafodion/dcs/rest/client/Cluster.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
-* @@@ START COPYRIGHT @@@
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-* @@@ END COPYRIGHT @@@
- */
-
-package org.trafodion.dcs.rest.client;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * A list of 'host:port' addresses of HTTP servers operating as a single
- * entity, for example multiple redundant web service gateways.
- */
-public class Cluster {
- protected List<String> nodes =
- Collections.synchronizedList(new ArrayList<String>());
- protected String lastHost;
-
- /**
- * Constructor
- */
- public Cluster() {}
-
- /**
- * Constructor
- * @param nodes a list of service locations, in 'host:port' format
- */
- public Cluster(List<String> nodes) {
- nodes.addAll(nodes);
- }
-
- /**
- * @return true if no locations have been added, false otherwise
- */
- public boolean isEmpty() {
- return nodes.isEmpty();
- }
-
- /**
- * Add a node to the cluster
- * @param node the service location in 'host:port' format
- */
- public Cluster add(String node) {
- nodes.add(node);
- return this;
- }
-
- /**
- * Add a node to the cluster
- * @param name host name
- * @param port service port
- */
- public Cluster add(String name, int port) {
- StringBuilder sb = new StringBuilder();
- sb.append(name);
- sb.append(':');
- sb.append(port);
- return add(sb.toString());
- }
-
- /**
- * Remove a node from the cluster
- * @param node the service location in 'host:port' format
- */
- public Cluster remove(String node) {
- nodes.remove(node);
- return this;
- }
-
- /**
- * Remove a node from the cluster
- * @param name host name
- * @param port service port
- */
- public Cluster remove(String name, int port) {
- StringBuilder sb = new StringBuilder();
- sb.append(name);
- sb.append(':');
- sb.append(port);
- return remove(sb.toString());
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7fe6dd13/dcs/src/main/java/org/trafodion/dcs/rest/client/Response.java
----------------------------------------------------------------------
diff --git a/dcs/src/main/java/org/trafodion/dcs/rest/client/Response.java b/dcs/src/main/java/org/trafodion/dcs/rest/client/Response.java
deleted file mode 100644
index 025eb2f..0000000
--- a/dcs/src/main/java/org/trafodion/dcs/rest/client/Response.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
-* @@@ START COPYRIGHT @@@
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-* @@@ END COPYRIGHT @@@
- */
-
-package org.trafodion.dcs.rest.client;
-
-import org.apache.commons.httpclient.Header;
-
-/**
- * The HTTP result code, response headers, and body of a HTTP response.
- */
-public class Response {
- private int code;
- private Header[] headers;
- private byte[] body;
-
- /**
- * Constructor
- * @param code the HTTP response code
- */
- public Response(int code) {
- this(code, null, null);
- }
-
- /**
- * Constructor
- * @param code the HTTP response code
- * @param headers the HTTP response headers
- */
- public Response(int code, Header[] headers) {
- this(code, headers, null);
- }
-
- /**
- * Constructor
- * @param code the HTTP response code
- * @param headers the HTTP response headers
- * @param body the response body, can be null
- */
- public Response(int code, Header[] headers, byte[] body) {
- this.code = code;
- this.headers = headers;
- this.body = body;
- }
-
- /**
- * @return the HTTP response code
- */
- public int getCode() {
- return code;
- }
-
- /**
- * @return the HTTP response headers
- */
- public Header[] getHeaders() {
- return headers;
- }
-
- public String getHeader(String key) {
- for (Header header: headers) {
- if (header.getName().equalsIgnoreCase(key)) {
- return header.getValue();
- }
- }
- return null;
- }
-
- /**
- * @return the value of the Location header
- */
- public String getLocation() {
- return getHeader("Location");
- }
-
- /**
- * @return true if a response body was sent
- */
- public boolean hasBody() {
- return body != null;
- }
-
- /**
- * @return the HTTP response body
- */
- public byte[] getBody() {
- return body;
- }
-
- /**
- * @param code the HTTP response code
- */
- public void setCode(int code) {
- this.code = code;
- }
-
- /**
- * @param headers the HTTP response headers
- */
- public void setHeaders(Header[] headers) {
- this.headers = headers;
- }
-
- /**
- * @param body the response body
- */
- public void setBody(byte[] body) {
- this.body = body;
- }
-}
[4/4] incubator-trafodion git commit: Merge [TRAFODION-1828] PR-370
DCS - Remove unneeded dependent jars
Posted by ar...@apache.org.
Merge [TRAFODION-1828] PR-370 DCS - Remove unneeded dependent jars
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/0da99034
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/0da99034
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/0da99034
Branch: refs/heads/master
Commit: 0da99034400f862caa6a1885213ed2060649d227
Parents: 41e5759 9291936
Author: Arvind Narain <ar...@apache.org>
Authored: Thu Mar 10 18:26:58 2016 +0000
Committer: Arvind Narain <ar...@apache.org>
Committed: Thu Mar 10 18:26:58 2016 +0000
----------------------------------------------------------------------
dcs/bin/dcs | 20 -
dcs/bin/dcs-config.sh | 21 -
dcs/bin/dcs-daemon.sh | 21 -
dcs/bin/dcs-daemons.sh | 20 -
dcs/pom.xml | 151 +-----
dcs/src/assembly/all.xml | 11 +-
.../org/trafodion/dcs/master/DcsMaster.java | 2 -
.../dcs/master/MasterStatusServlet.java | 22 +-
.../java/org/trafodion/dcs/rest/DcsRest.java | 215 --------
.../trafodion/dcs/rest/GetStatusResponse.java | 50 --
.../org/trafodion/dcs/rest/RESTServlet.java | 172 ------
.../org/trafodion/dcs/rest/ResourceBase.java | 34 --
.../org/trafodion/dcs/rest/ResourceConfig.java | 31 --
.../org/trafodion/dcs/rest/RestConstants.java | 63 ---
.../org/trafodion/dcs/rest/RootResource.java | 102 ----
.../org/trafodion/dcs/rest/ServerConnector.java | 79 ---
.../org/trafodion/dcs/rest/ServerResource.java | 158 ------
.../org/trafodion/dcs/rest/VersionResource.java | 122 -----
.../trafodion/dcs/rest/WorkloadResource.java | 140 -----
.../org/trafodion/dcs/rest/client/Client.java | 504 ------------------
.../org/trafodion/dcs/rest/client/Cluster.java | 102 ----
.../org/trafodion/dcs/rest/client/Response.java | 129 -----
.../trafodion/dcs/rest/model/ServerModel.java | 530 -------------------
.../trafodion/dcs/rest/model/VersionModel.java | 193 -------
.../dcs/rest/model/WorkloadListModel.java | 225 --------
.../trafodion/dcs/rest/model/WorkloadModel.java | 139 -----
.../dcs/rest/provider/JAXBContextResolver.java | 84 ---
.../producer/PlainTextMessageBodyProducer.java | 92 ----
.../dcs-webapps/master/aggr_querystats.html | 88 ---
.../dcs-webapps/master/aggr_querystats.jsp | 85 ---
.../resources/dcs-webapps/master/explain.html | 62 ---
.../resources/dcs-webapps/master/queryPlan.jsp | 77 ---
.../dcs-webapps/master/querystats.html | 89 ----
.../resources/dcs-webapps/master/querystats.jsp | 89 ----
.../resources/dcs-webapps/master/repository.jsp | 114 ----
.../resources/dcs-webapps/master/sessions.html | 87 ---
.../resources/dcs-webapps/master/sessions.jsp | 89 ----
37 files changed, 15 insertions(+), 4197 deletions(-)
----------------------------------------------------------------------