[ 
https://issues.apache.org/jira/browse/TRAFODION-3110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16516297#comment-16516297
 ] 

ASF GitHub Bot commented on TRAFODION-3110:
-------------------------------------------

Github user sandhyasun commented on a diff in the pull request:

    https://github.com/apache/trafodion/pull/1612#discussion_r196208968
  
    --- Diff: core/sql/exp/ExpLOBaccess.cpp ---
    @@ -2972,28 +3086,8 @@ if (!lobGlobals->isHive() )
     
     void cleanupLOBDataDescFiles(const char *lobHdfsServer,int 
lobHdfsPort,const char *lobHdfsLoc)
     { 
    -  int numExistingFiles=0;
    -  hdfsFS fs;
    -  int err = 0;
    -  fs = hdfsConnect(lobHdfsServer, lobHdfsPort);
    -  if (fs == NULL)
    -    return;
    -  // Get this list of all data and desc files in the lob sotrage location
    -  hdfsFileInfo *fileInfos = hdfsListDirectory(fs, lobHdfsLoc, 
&numExistingFiles);
    -  if (fileInfos == NULL)
    -      return ;
    -    
    -  //Delete each one in a loop
    -  for (int i = 0; i < numExistingFiles; i++)  
    -    {    
    -      err = hdfsDelete(fs, fileInfos[i].mName, 0);
    -    }
    -    
    -  // *Note* : delete the memory allocated by libhdfs for the file info 
array  
    -  if (fileInfos)
    -    {
    -      hdfsFreeFileInfo(fileInfos, numExistingFiles);
    -    }
    +  HDFS_Client_RetCode hdfsClientRetcode  = 
HdfsClient::hdfsDeletePath(lobHdfsLoc);//ok to ignore error.
    --- End diff --
    
    Checked again and this is ok . The cleanupLOBDataDescFiles is called form 
sqlcomp during ::dropSeabaseMD.    That's used when we are doing a complete 
cleanup of all trafodion objects so it's ok to drop all the LOB data files too. 
 


> Refactor LOB access to use the new implementation of HdfsClient
> ---------------------------------------------------------------
>
>                 Key: TRAFODION-3110
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-3110
>             Project: Apache Trafodion
>          Issue Type: Sub-task
>          Components: sql-exe
>            Reporter: Selvaganesan Govindarajan
>            Assignee: Selvaganesan Govindarajan
>            Priority: Major
>
> By making LOB to use the new implementation of HdfsClient, the use of libHdfs 
> is avoided in yet another feature. This also simplifies the hdfs access 
> related code in this feature.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to