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.
---