mirror of https://github.com/citusdata/citus.git
Apply citus_indent
parent
f521ffefa8
commit
bd5075242e
|
@ -142,24 +142,25 @@ Datum
|
||||||
cluster_initialize_node_metadata(PG_FUNCTION_ARGS)
|
cluster_initialize_node_metadata(PG_FUNCTION_ARGS)
|
||||||
{
|
{
|
||||||
PG_RETURN_BOOL(true);
|
PG_RETURN_BOOL(true);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
text *filePath = PG_GETARG_TEXT_P(0);
|
* text *filePath = PG_GETARG_TEXT_P(0);
|
||||||
char *filePathCStr = text_to_cstring(filePath);
|
* char *filePathCStr = text_to_cstring(filePath);
|
||||||
|
*
|
||||||
ListCell *workerNodeCell = NULL;
|
* ListCell *workerNodeCell = NULL;
|
||||||
List *workerNodes = ParseWorkerNodeFile(filePathCStr);
|
* List *workerNodes = ParseWorkerNodeFile(filePathCStr);
|
||||||
|
*
|
||||||
foreach(workerNodeCell, workerNodes)
|
* foreach(workerNodeCell, workerNodes)
|
||||||
{
|
* {
|
||||||
WorkerNode *workerNode = (WorkerNode *) lfirst(workerNodeCell);
|
* WorkerNode *workerNode = (WorkerNode *) lfirst(workerNodeCell);
|
||||||
Datum workerNameDatum = PointerGetDatum(cstring_to_text(workerNode->workerName));
|
* Datum workerNameDatum = PointerGetDatum(cstring_to_text(workerNode->workerName));
|
||||||
|
*
|
||||||
DirectFunctionCall3(cluster_add_node, workerNameDatum,
|
* DirectFunctionCall3(cluster_add_node, workerNameDatum,
|
||||||
UInt32GetDatum(workerNode->workerPort),
|
* UInt32GetDatum(workerNode->workerPort),
|
||||||
PointerGetDatum(NULL));
|
* PointerGetDatum(NULL));
|
||||||
}
|
* }
|
||||||
|
*
|
||||||
PG_RETURN_BOOL(true);
|
* PG_RETURN_BOOL(true);
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,7 +280,6 @@ GetMaxGroupId()
|
||||||
if (workerNodeGroupId > maxGroupId)
|
if (workerNodeGroupId > maxGroupId)
|
||||||
{
|
{
|
||||||
maxGroupId = workerNodeGroupId;
|
maxGroupId = workerNodeGroupId;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -369,7 +369,6 @@ ParseWorkerNodeFile(const char *workerNodeFilename)
|
||||||
char nodePortString[MAX_PORT_LENGTH + 1];
|
char nodePortString[MAX_PORT_LENGTH + 1];
|
||||||
|
|
||||||
memset(nodeName, '\0', sizeof(nodeName));
|
memset(nodeName, '\0', sizeof(nodeName));
|
||||||
//strlcpy(nodeRack, WORKER_DEFAULT_RACK, sizeof(nodeRack));
|
|
||||||
memset(nodePortString, '\0', sizeof(nodePortString));
|
memset(nodePortString, '\0', sizeof(nodePortString));
|
||||||
|
|
||||||
if (workerLineLength == MAXPGPATH - 1)
|
if (workerLineLength == MAXPGPATH - 1)
|
||||||
|
@ -446,7 +445,6 @@ ParseWorkerNodeFile(const char *workerNodeFilename)
|
||||||
workerNode = (WorkerNode *) palloc0(sizeof(WorkerNode));
|
workerNode = (WorkerNode *) palloc0(sizeof(WorkerNode));
|
||||||
|
|
||||||
strlcpy(workerNode->workerName, nodeName, WORKER_LENGTH);
|
strlcpy(workerNode->workerName, nodeName, WORKER_LENGTH);
|
||||||
//strlcpy(workerNode->workerRack, nodeRack, WORKER_LENGTH);
|
|
||||||
workerNode->workerPort = nodePort;
|
workerNode->workerPort = nodePort;
|
||||||
|
|
||||||
workerNodeList = lappend(workerNodeList, workerNode);
|
workerNodeList = lappend(workerNodeList, workerNode);
|
||||||
|
|
Loading…
Reference in New Issue