Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4FE2B18487 for ; Fri, 29 Apr 2016 09:17:13 +0000 (UTC) Received: (qmail 72458 invoked by uid 500); 29 Apr 2016 09:17:13 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 72428 invoked by uid 500); 29 Apr 2016 09:17:13 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 72416 invoked by uid 99); 29 Apr 2016 09:17:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Apr 2016 09:17:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id EB8B02C1F62 for ; Fri, 29 Apr 2016 09:17:12 +0000 (UTC) Date: Fri, 29 Apr 2016 09:17:12 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-11683) Code refactor for StorageServiceMBean.forceRepair* methods MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-11683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15263789#comment-15263789 ] ASF GitHub Bot commented on CASSANDRA-11683: -------------------------------------------- GitHub user peoplehlj opened a pull request: https://github.com/apache/cassandra/pull/68 CASSANDRA-11683: Code refactor for StorageServiceMBean.forceRepair* methods This patch is for https://issues.apache.org/jira/browse/CASSANDRA-11683 For the class StorageServiceMBean, it has below methods, ``` public int forceRepairAsync(String keyspace, boolean isSequential, Collection dataCenters, Collection hosts, boolean primaryRange, boolean repairedAt, String... columnFamilies) throws IOException; public int forceRepairRangeAsync(String beginToken, String endToken, String keyspaceName, boolean isSequential, Collection dataCenters, Collection hosts, boolean repairedAt, String... columnFamilies) throws IOException; public int forceRepairRangeAsync(String beginToken, String endToken, String keyspaceName, boolean isSequential, boolean isLocal, boolean repairedAt, String... columnFamilies); ``` But in the implementation, the arguments are different from this MBean, please notice the last second argument, from *repairedAt* to *fullRepair*, and actually *fullRepair* is more clear for this API. ``` public int forceRepairAsync(String keyspace, boolean isSequential, Collection dataCenters, Collection hosts, boolean primaryRange, boolean fullRepair, String... columnFamilies) throws IOException{} public int forceRepairRangeAsync(String beginToken, String endToken, String keyspaceName, boolean isSequential, Collection dataCenters, Collection hosts, boolean fullRepair, String... columnFamilies) throws IOException{} public int forceRepairRangeAsync(String beginToken, String endToken, String keyspaceName, boolean isSequential, Collection dataCenters, Collection hosts, boolean fullRepair, String... columnFamilies) throws IOException{} ``` This will make developers confused, for example I met an issue that we didn't want to do a "full" repair but from the MBean I didn't know how to pass the argument. Please help to merge it if we want to fix this issue, thanks in advance. You can merge this pull request into a Git repository by running: $ git pull https://github.com/peoplehlj/cassandra CASSANDRA-11683 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cassandra/pull/68.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #68 ---- commit 4c8b75bc664371c19e118f8497f9777831721084 Author: Huang, Lijun Date: 2016-04-29T09:11:17Z CASSANDRA-11683: Code refactor for StorageServiceMBean.forceRepair* methods ---- > Code refactor for StorageServiceMBean.forceRepair* methods > ---------------------------------------------------------- > > Key: CASSANDRA-11683 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11683 > Project: Cassandra > Issue Type: Bug > Reporter: Lijun Huang > Priority: Trivial > Fix For: 2.1.x > > > For the class StorageServiceMBean, it has below methods, > {code:title=org/apache/cassandra/service/StorageServiceMBean.java|borderStyle=solid} > public int forceRepairAsync(String keyspace, boolean isSequential, Collection dataCenters, Collection hosts, boolean primaryRange, boolean repairedAt, String... columnFamilies) throws IOException; > public int forceRepairRangeAsync(String beginToken, String endToken, String keyspaceName, boolean isSequential, Collection dataCenters, Collection hosts, boolean repairedAt, String... columnFamilies) throws IOException; > public int forceRepairRangeAsync(String beginToken, String endToken, String keyspaceName, boolean isSequential, boolean isLocal, boolean repairedAt, String... columnFamilies); > {code} > But in the implementation, the arguments are different from this MBean, please notice the last second argument, from *repairedAt* to *fullRepair*, and actually *fullRepair* is more clear for this API. > {code:title=org/apache/cassandra/service/StorageService.java|borderStyle=solid} > public int forceRepairAsync(String keyspace, boolean isSequential, Collection dataCenters, Collection hosts, boolean primaryRange, boolean fullRepair, String... columnFamilies) throws IOException{} > public int forceRepairRangeAsync(String beginToken, String endToken, String keyspaceName, boolean isSequential, Collection dataCenters, Collection hosts, boolean fullRepair, String... columnFamilies) throws IOException{} > public int forceRepairRangeAsync(String beginToken, String endToken, String keyspaceName, boolean isSequential, Collection dataCenters, Collection hosts, boolean fullRepair, String... columnFamilies) throws IOException{} > {code} > This will make developers confused, for example I met an issue that we didn't want to do a "full" repair but from the MBean I didn't know how to pass the argument. > I will send out a patch soon, and please help to merge it if we want to fix this issue. -- This message was sent by Atlassian JIRA (v6.3.4#6332)