mirror of https://github.com/citusdata/citus.git
Rename CreateDirectory to CitusCreateDirectory
parent
aa2ab023a2
commit
30a2365d81
|
@ -293,7 +293,7 @@ static void
|
||||||
PrepareMasterJobDirectory(Job *workerJob)
|
PrepareMasterJobDirectory(Job *workerJob)
|
||||||
{
|
{
|
||||||
StringInfo jobDirectoryName = MasterJobDirectoryName(workerJob->jobId);
|
StringInfo jobDirectoryName = MasterJobDirectoryName(workerJob->jobId);
|
||||||
CreateDirectory(jobDirectoryName);
|
CitusCreateDirectory(jobDirectoryName);
|
||||||
|
|
||||||
ResourceOwnerEnlargeJobDirectories(CurrentResourceOwner);
|
ResourceOwnerEnlargeJobDirectories(CurrentResourceOwner);
|
||||||
ResourceOwnerRememberJobDirectory(CurrentResourceOwner, workerJob->jobId);
|
ResourceOwnerRememberJobDirectory(CurrentResourceOwner, workerJob->jobId);
|
||||||
|
|
|
@ -341,7 +341,7 @@ TrackerCleanupJobDirectories(void)
|
||||||
appendStringInfo(jobCacheDirectory, "base/%s", PG_JOB_CACHE_DIR);
|
appendStringInfo(jobCacheDirectory, "base/%s", PG_JOB_CACHE_DIR);
|
||||||
|
|
||||||
CitusRemoveDirectory(jobCacheDirectory);
|
CitusRemoveDirectory(jobCacheDirectory);
|
||||||
CreateDirectory(jobCacheDirectory);
|
CitusCreateDirectory(jobCacheDirectory);
|
||||||
|
|
||||||
FreeStringInfo(jobCacheDirectory);
|
FreeStringInfo(jobCacheDirectory);
|
||||||
}
|
}
|
||||||
|
@ -1086,7 +1086,7 @@ CreateJobDirectoryIfNotExists(uint64 jobId)
|
||||||
bool jobDirectoryExists = DirectoryExists(jobDirectoryName);
|
bool jobDirectoryExists = DirectoryExists(jobDirectoryName);
|
||||||
if (!jobDirectoryExists)
|
if (!jobDirectoryExists)
|
||||||
{
|
{
|
||||||
CreateDirectory(jobDirectoryName);
|
CitusCreateDirectory(jobDirectoryName);
|
||||||
}
|
}
|
||||||
|
|
||||||
FreeStringInfo(jobDirectoryName);
|
FreeStringInfo(jobDirectoryName);
|
||||||
|
|
|
@ -333,13 +333,13 @@ InitTaskDirectory(uint64 jobId, uint32 taskId)
|
||||||
jobDirectoryExists = DirectoryExists(jobDirectoryName);
|
jobDirectoryExists = DirectoryExists(jobDirectoryName);
|
||||||
if (!jobDirectoryExists)
|
if (!jobDirectoryExists)
|
||||||
{
|
{
|
||||||
CreateDirectory(jobDirectoryName);
|
CitusCreateDirectory(jobDirectoryName);
|
||||||
}
|
}
|
||||||
|
|
||||||
taskDirectoryExists = DirectoryExists(taskDirectoryName);
|
taskDirectoryExists = DirectoryExists(taskDirectoryName);
|
||||||
if (!taskDirectoryExists)
|
if (!taskDirectoryExists)
|
||||||
{
|
{
|
||||||
CreateDirectory(taskDirectoryName);
|
CitusCreateDirectory(taskDirectoryName);
|
||||||
}
|
}
|
||||||
|
|
||||||
UnlockJobResource(jobId, AccessExclusiveLock);
|
UnlockJobResource(jobId, AccessExclusiveLock);
|
||||||
|
@ -371,7 +371,7 @@ InitTaskAttemptDirectory(uint64 jobId, uint32 taskId)
|
||||||
* If this task previously failed, and gets re-executed and improbably draws
|
* If this task previously failed, and gets re-executed and improbably draws
|
||||||
* the same randomId, the task will fail to create the directory.
|
* the same randomId, the task will fail to create the directory.
|
||||||
*/
|
*/
|
||||||
CreateDirectory(taskAttemptDirectoryName);
|
CitusCreateDirectory(taskAttemptDirectoryName);
|
||||||
|
|
||||||
return taskAttemptDirectoryName;
|
return taskAttemptDirectoryName;
|
||||||
}
|
}
|
||||||
|
@ -602,7 +602,7 @@ DirectoryExists(StringInfo directoryName)
|
||||||
|
|
||||||
/* Creates a new directory with the given directory name. */
|
/* Creates a new directory with the given directory name. */
|
||||||
void
|
void
|
||||||
CreateDirectory(StringInfo directoryName)
|
CitusCreateDirectory(StringInfo directoryName)
|
||||||
{
|
{
|
||||||
int makeOK = mkdir(directoryName->data, S_IRWXU);
|
int makeOK = mkdir(directoryName->data, S_IRWXU);
|
||||||
if (makeOK != 0)
|
if (makeOK != 0)
|
||||||
|
|
|
@ -114,7 +114,7 @@ extern StringInfo PartitionFilename(StringInfo directoryName, uint32 partitionId
|
||||||
extern bool CacheDirectoryElement(const char *filename);
|
extern bool CacheDirectoryElement(const char *filename);
|
||||||
extern bool JobDirectoryElement(const char *filename);
|
extern bool JobDirectoryElement(const char *filename);
|
||||||
extern bool DirectoryExists(StringInfo directoryName);
|
extern bool DirectoryExists(StringInfo directoryName);
|
||||||
extern void CreateDirectory(StringInfo directoryName);
|
extern void CitusCreateDirectory(StringInfo directoryName);
|
||||||
extern void CitusRemoveDirectory(StringInfo filename);
|
extern void CitusRemoveDirectory(StringInfo filename);
|
||||||
extern StringInfo InitTaskDirectory(uint64 jobId, uint32 taskId);
|
extern StringInfo InitTaskDirectory(uint64 jobId, uint32 taskId);
|
||||||
extern void RemoveJobSchema(StringInfo schemaName);
|
extern void RemoveJobSchema(StringInfo schemaName);
|
||||||
|
|
Loading…
Reference in New Issue