Skip to content
Permalink
Browse files
AMBARI-22740 : Rename ambari metrics collector package to org.apache.…
…ambari.metrics.
  • Loading branch information
Aravindan Vijayan committed Apr 18, 2018
1 parent 10dac3d commit 4e1713b7c36f778994a2214db98364bef7635534
Showing 161 changed files with 1,120 additions and 1,108 deletions.
@@ -20,7 +20,6 @@
/**
* Is used to determine metrics aggregate table.
*
* @see org.apache.hadoop.yarn.server.applicationhistoryservice.webapp.TimelineWebServices#getTimelineMetric
*/
public enum Precision {
SECONDS,
@@ -238,7 +238,7 @@ function start()
echo "$(date) Launching in distributed mode. Assuming Hbase daemons up and running." | tee -a $STARTUPFILE
fi

CLASS='org.apache.hadoop.yarn.server.applicationhistoryservice.AMSApplicationServer'
CLASS='org.apache.ambari.metrics.AMSApplicationServer'
# YARN_OPTS="${YARN_OPTS} ${YARN_TIMELINESERVER_OPTS}"
# if [[ -n "${YARN_TIMELINESERVER_HEAPSIZE}" ]]; then
# JAVA_HEAP_MAX="-Xmx${YARN_TIMELINESERVER_HEAPSIZE}m"
@@ -930,7 +930,7 @@
<classpathPrefix></classpathPrefix>
<!-- Specifies the main class of the application -->
<mainClass>
org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.MetricsLoadSimulator
org.apache.ambari.metrics.core.loadsimulator.MetricsLoadSimulator
</mainClass>
</manifest>
</archive>
@@ -16,9 +16,7 @@
* limitations under the License.
*/

package org.apache.hadoop.yarn.server.applicationhistoryservice;

import static org.apache.hadoop.http.HttpServer2.HTTP_MAX_THREADS_KEY;
package org.apache.ambari.metrics;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -33,13 +31,15 @@
import org.apache.hadoop.yarn.YarnUncaughtExceptionHandler;
import org.apache.hadoop.yarn.conf.YarnConfiguration;
import org.apache.hadoop.yarn.exceptions.YarnRuntimeException;
import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.HBaseTimelineMetricsService;
import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.TimelineMetricConfiguration;
import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.TimelineMetricStore;
import org.apache.hadoop.yarn.server.applicationhistoryservice.webapp.AMSWebApp;
import org.apache.ambari.metrics.core.timeline.HBaseTimelineMetricsService;
import org.apache.ambari.metrics.core.timeline.TimelineMetricConfiguration;
import org.apache.ambari.metrics.core.timeline.TimelineMetricStore;
import org.apache.ambari.metrics.webapp.AMSWebApp;
import org.apache.hadoop.yarn.webapp.WebApp;
import org.apache.hadoop.yarn.webapp.WebApps;

import static org.apache.hadoop.http.HttpServer2.HTTP_MAX_THREADS_KEY;

/**
* Metrics collector web server
*/
@@ -15,11 +15,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.yarn.server.applicationhistoryservice.metrics
.loadsimulator;
package org.apache.ambari.metrics.core.loadsimulator;

import static org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.data.AppID.MASTER_APPS;
import static org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.data.AppID.SLAVE_APPS;
import static org.apache.ambari.metrics.core.loadsimulator.data.AppID.MASTER_APPS;
import static org.apache.ambari.metrics.core.loadsimulator.data.AppID.SLAVE_APPS;

import java.util.ArrayList;
import java.util.Collection;
@@ -32,13 +31,13 @@
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.data.AppID;
import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.data.ApplicationInstance;
import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.data.HostMetricsGenerator;
import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.data.MetricsGeneratorConfigurer;
import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.net.MetricsSender;
import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.net.RestMetricsSender;
import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.util.TimeStampProvider;
import org.apache.ambari.metrics.core.loadsimulator.data.ApplicationInstance;
import org.apache.ambari.metrics.core.loadsimulator.data.HostMetricsGenerator;
import org.apache.ambari.metrics.core.loadsimulator.data.MetricsGeneratorConfigurer;
import org.apache.ambari.metrics.core.loadsimulator.net.MetricsSender;
import org.apache.ambari.metrics.core.loadsimulator.net.RestMetricsSender;
import org.apache.ambari.metrics.core.loadsimulator.util.TimeStampProvider;
import org.apache.ambari.metrics.core.loadsimulator.data.AppID;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@@ -15,8 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.yarn.server.applicationhistoryservice.metrics
.loadsimulator;
package org.apache.ambari.metrics.core.loadsimulator;

import java.io.IOException;
import java.util.HashMap;
@@ -15,17 +15,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator;
package org.apache.ambari.metrics.core.loadsimulator;


import java.io.IOException;
import java.util.concurrent.Callable;

import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.data.AppMetrics;
import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.data.HostMetricsGenerator;
import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.net.MetricsSender;
import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.net.RestMetricsSender;
import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.util.Json;
import org.apache.ambari.metrics.core.loadsimulator.util.Json;
import org.apache.ambari.metrics.core.loadsimulator.data.AppMetrics;
import org.apache.ambari.metrics.core.loadsimulator.data.HostMetricsGenerator;
import org.apache.ambari.metrics.core.loadsimulator.net.MetricsSender;
import org.apache.ambari.metrics.core.loadsimulator.net.RestMetricsSender;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@@ -15,8 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.yarn.server.applicationhistoryservice.metrics
.loadsimulator.data;
package org.apache.ambari.metrics.core.loadsimulator.data;

public enum AppID {
HOST("HOST"),
@@ -15,8 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.yarn.server.applicationhistoryservice.metrics
.loadsimulator.data;
package org.apache.ambari.metrics.core.loadsimulator.data;

import java.util.ArrayList;
import java.util.Collection;
@@ -15,8 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.yarn.server.applicationhistoryservice.metrics
.loadsimulator.data;
package org.apache.ambari.metrics.core.loadsimulator.data;

/**
* AppId is a helper class that encapsulates the common part of metrics message.
@@ -15,14 +15,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.data;
package org.apache.ambari.metrics.core.loadsimulator.data;


import java.util.HashMap;
import java.util.Map;

import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.util.RandomMetricsProvider;
import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.util.TimeStampProvider;
import org.apache.ambari.metrics.core.loadsimulator.util.RandomMetricsProvider;
import org.apache.ambari.metrics.core.loadsimulator.util.TimeStampProvider;

/**
*/
@@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.data;
package org.apache.ambari.metrics.core.loadsimulator.data;

import java.util.LinkedHashMap;
import java.util.Map;
@@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.data;
package org.apache.ambari.metrics.core.loadsimulator.data;


import java.io.BufferedReader;
@@ -25,8 +25,8 @@
import java.util.HashMap;
import java.util.Map;

import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.util.RandomMetricsProvider;
import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.util.TimeStampProvider;
import org.apache.ambari.metrics.core.loadsimulator.util.TimeStampProvider;
import org.apache.ambari.metrics.core.loadsimulator.util.RandomMetricsProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.net;
package org.apache.ambari.metrics.core.loadsimulator.net;

/**
* MetricSender should provides a simple way of pushing metrics to some service.
@@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.net;
package org.apache.ambari.metrics.core.loadsimulator.net;

import java.io.IOException;
import java.util.concurrent.TimeUnit;
@@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.net;
package org.apache.ambari.metrics.core.loadsimulator.net;

import java.io.PrintStream;

@@ -15,8 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.yarn.server.applicationhistoryservice.metrics
.loadsimulator.net;
package org.apache.ambari.metrics.core.loadsimulator.net;

import java.io.BufferedReader;
import java.io.IOException;
@@ -15,8 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.yarn.server.applicationhistoryservice.metrics
.loadsimulator.util;
package org.apache.ambari.metrics.core.loadsimulator.util;

import java.io.IOException;