[
https://issues.apache.org/jira/browse/TRAFODION-3110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16515387#comment-16515387
]
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_r195973304
--- 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 --
What does lobHdfsLoc point to ? We are supposed to delete only the
specific descriptor files belonging to the table we are doing cleanup on.
> 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)