From hdfs-issues-return-208117-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Mon Jan 22 14:00:05 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 699EF180609 for ; Mon, 22 Jan 2018 14:00:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 57D37160C4B; Mon, 22 Jan 2018 13:00:05 +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 9E514160C3A for ; Mon, 22 Jan 2018 14:00:04 +0100 (CET) Received: (qmail 76179 invoked by uid 500); 22 Jan 2018 13:00: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 76166 invoked by uid 99); 22 Jan 2018 13:00:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jan 2018 13:00:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 3DB82C3A99 for ; Mon, 22 Jan 2018 13:00:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -107.911 X-Spam-Level: X-Spam-Status: No, score=-107.911 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Pt3KXBGIo5Cx for ; Mon, 22 Jan 2018 13:00:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 72EFB5F2AB for ; Mon, 22 Jan 2018 13:00:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 9F790E0383 for ; Mon, 22 Jan 2018 13:00:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 3F2E021207 for ; Mon, 22 Jan 2018 13:00:00 +0000 (UTC) Date: Mon, 22 Jan 2018 13:00:00 +0000 (UTC) From: "Rakesh R (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-13025) [SPS]: Implement a mechanism to scan the files for external SPS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-13025?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1633= 4224#comment-16334224 ]=20 Rakesh R commented on HDFS-13025: --------------------------------- Thanks [~umamaheswararao] for the quick turnaround. {{TestExternalStoragePo= licySatisfier}} unit testing idea is awesome. Added few comments, please ta= ke care. # Please add few details about the reason to ignore like, {{@Ignore("reason= why this test is skipping")}} # Add javadoc for {{boolean scanCompleted}} BlockStorageMovementNeeded#addA= ll() and BlockStorageMovementNeeded#add() methods. Aslo, please remove unwa= nted {{@param startId}} from BlockStorageMovementNeeded#add() # Can we avoid duplicate codes. How about create a method and reuse like be= low,=20 {code} // add javadoc public synchronized void addAll(long startId, List itemInfoList, boolean scanCompleted) { storageMovementNeeded.addAll(itemInfoList); add(startId, scanCompleted); } // add javadoc public synchronized void add(ItemInfo itemInfo, boolean scanCompleted) { storageMovementNeeded.add(itemInfo); add(itemInfo.getStartId(), scanCompleted); } private void add(long startId, boolean scanCompleted) { DirPendingWorkInfo pendingWork =3D pendingWorkForDirectory.get(startId); if (pendingWork =3D=3D null) { pendingWork =3D new DirPendingWorkInfo(); pendingWorkForDirectory.put(startId, pendingWork); } pendingWork.addPendingWorkCount(1); if (scanCompleted) { pendingWork.markScanCompleted(); } } {code} # Below {{service.addAllFileIdsToProcess}} call is going to {{BlockStorageM= ovementNeeded#addAll}} then add an entry to {{pendingWorkForDirectory.put(s= tartId, pendingWork);}}. If the InodeId is a file, should we need to add in= to the {{pendingWorkForDirectory}} and mark as scanned? {code} IntraSPSNameNodeFileIdCollector#scanAndCollectFileIds() ...// other logic =09=09 ...// other logic service.addAllFileIdsToProcess(startInode.getId(), currentBatch, t= rue); {code} # Please add annotation {{@InterfaceAudience.Private}} to IntraSPSNameNodeF= ileIdCollector, ExternalSPSFileIDCollector & other missing classes, if any. # If {{dfs}} is not created then skip #processPath and #scanAndCollectFileI= ds to avoid NPE. I remember we discussed about retries, probably we could a= dd null check {{dfs !=3D null}} before using dfs. // TODO about retry mecha= nism now as a reminder and later we could implement this post branch merge. {code} ExternalSPSFileIDCollector.java LOG.error("Unable to get the filesystem. Make sure Namenode running and " + "configured namenode address is correct.", e); {code} # Please add debug log message here saying, no children for this directory. {code} ExternalSPSFileIDCollector .java 85=09 if (children =3D=3D null) { 86=09 return; 87=09 } {code} > [SPS]: Implement a mechanism to scan the files for external SPS > --------------------------------------------------------------- > > Key: HDFS-13025 > URL: https://issues.apache.org/jira/browse/HDFS-13025 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: namenode > Reporter: Uma Maheswara Rao G > Assignee: Uma Maheswara Rao G > Priority: Major > Attachments: HDFS-13025-HDFS-10285-0.patch, HDFS-13025-HDFS-10285= -1.patch > > > HDFS-12911=C2=A0modularization is introducing FileIDCollector interface f= or scanning the files. That will help us to plugin different ways of scanni= ng mechanisms if needed. > For Internal SPS, we have INode based scanning. For external SPS, we shou= ld go via client API scanning as we can not access NN internal structures.= =C2=A0 > This is the task to implement the scanning plugin for external SPS. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org