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