From hdfs-issues-return-287219-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Tue Oct 8 15:45:05 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 84692180654 for ; Tue, 8 Oct 2019 17:45:05 +0200 (CEST) Received: (qmail 27727 invoked by uid 500); 8 Oct 2019 15:45:03 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 27646 invoked by uid 99); 8 Oct 2019 15:45:03 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Oct 2019 15:45:03 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 7E395E315C for ; Tue, 8 Oct 2019 15:45:02 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 88671780896 for ; Tue, 8 Oct 2019 15:45:00 +0000 (UTC) Date: Tue, 8 Oct 2019 15:45:00 +0000 (UTC) From: "ASF GitHub Bot (Jira)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Work logged] (HDDS-1984) Fix listBucket API 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/HDDS-1984?focusedWorklogId=325134&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-325134 ] ASF GitHub Bot logged work on HDDS-1984: ---------------------------------------- Author: ASF GitHub Bot Created on: 08/Oct/19 15:44 Start Date: 08/Oct/19 15:44 Worklog Time Spent: 10m Work Description: bharatviswa504 commented on pull request #1555: HDDS-1984. Fix listBucket API. URL: https://github.com/apache/hadoop/pull/1555#discussion_r332589314 ########## File path: hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/db/cache/CacheKey.java ########## @@ -53,4 +53,18 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash(key); } + + @Override + public int compareTo(Object o) { + if(Objects.equals(key, ((CacheKey)o).key)) { + return 0; + } else { + if (key instanceof String) { + return ((String) key).compareTo((String) ((CacheKey)o).key); + } else { + // If not type string, convert to string and compare. + return key.toString().compareTo((((CacheKey) o).key).toString()); Review comment: Ya, you are right, my initial approach was that. But as this Table interface is extended by RDBTable which has byte[] as the parameter, that cannot be done. And also, for now, this is used for Bucket and VolumeTable we should be good. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 325134) Time Spent: 2h 40m (was: 2.5h) > Fix listBucket API > ------------------ > > Key: HDDS-1984 > URL: https://issues.apache.org/jira/browse/HDDS-1984 > Project: Hadoop Distributed Data Store > Issue Type: Sub-task > Reporter: Bharat Viswanadham > Assignee: Bharat Viswanadham > Priority: Major > Labels: pull-request-available > Time Spent: 2h 40m > Remaining Estimate: 0h > > This Jira is to fix listBucket API in HA code path. > In HA, we have an in-memory cache, where we put the result to in-memory cache and return the response, later it will be picked by double buffer thread and it will flush to disk. So, now when do listBuckets, it should use both in-memory cache and rocksdb bucket table to list buckets in a volume. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org