Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3C608200BE5 for ; Sat, 24 Dec 2016 19:23:34 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 3B310160B40; Sat, 24 Dec 2016 18:23:34 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 90F84160B2F for ; Sat, 24 Dec 2016 19:23:33 +0100 (CET) Received: (qmail 6361 invoked by uid 500); 24 Dec 2016 18:23:31 -0000 Mailing-List: contact dev-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list dev@accumulo.apache.org Received: (qmail 5418 invoked by uid 99); 24 Dec 2016 18:23:31 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Dec 2016 18:23:31 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 18A29DFCC5; Sat, 24 Dec 2016 18:23:31 +0000 (UTC) From: joshelser To: dev@accumulo.apache.org Reply-To: dev@accumulo.apache.org References: In-Reply-To: Subject: [GitHub] accumulo pull request #194: ACCUMULO-3005 Added REST API calls Content-Type: text/plain Message-Id: <20161224182331.18A29DFCC5@git1-us-west.apache.org> Date: Sat, 24 Dec 2016 18:23:31 +0000 (UTC) archived-at: Sat, 24 Dec 2016 18:23:34 -0000 Github user joshelser commented on a diff in the pull request: https://github.com/apache/accumulo/pull/194#discussion_r93819874 --- Diff: server/monitor/src/main/java/org/apache/accumulo/monitor/rest/resources/GarbageCollectorResource.java --- @@ -0,0 +1,101 @@ +/* + * 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.apache.accumulo.monitor.rest.resources; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; + +import org.apache.accumulo.core.gc.thrift.GCStatus; +import org.apache.accumulo.monitor.Monitor; +import org.apache.accumulo.monitor.rest.api.GarbageCollection; +import org.apache.accumulo.monitor.rest.api.GarbageCollectorCycle; +import org.apache.accumulo.monitor.rest.api.GarbageCollectorStatus; + +/** + * GarbageCollector metrics + */ +@Path("/gc") +@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) +public class GarbageCollectorResource { + + @GET --- End diff -- I think the `@GET` could be lifted to the class-level and it would be implied on each method to remove some duplication. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---