Chris Tabakakis
07/13/2023, 2:45 PM(7c47ca8b3c53e4646c5f02c6e329a650_6b68f1bbaa75cb9b23c5012ad11acdd0_1_0) switched from RUNNING to FAILED with failure cause: java.lang.Exception: The data preparation for task 'CHAIN GroupReduce (GroupReduce at run(TriangleEnumerator.java:72)) -> Combine (Reduce at run(TriangleEnumerator.java:74))' , caused an error: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Error obtaining the sorted input: Thread 'SortMerger Reading Thread' terminated due to an exception: Connection unexpectedly closed by remote task manager '10.0.1.72/10.0.1.72:45235 [ 10.0.1.72:35991-49e4c4 ] '. This might indicate that the remote task manager was lost.
I've been struggling to figure out what the cause of this might be. At first I thought it might be a problem with hadoop, but I tried a simpler program that reads the same data but just writes it to another file in hdfs, and it worked fine. I have the log from the task manager that didn't complete the first task, and it's set to loglevel=debug, because I couldn't find anything useful in info. I'm appending it here. I still think this might be related to hadoop because i'm noticing some weird things such as:
• At the beginning, it states hadoop version = 2.8.3, which is not the case, my system is running hadoop 3.3.5, and I don't think I've set the version as an option somewhere. I've also placed the respective jar files in the lib folder, with hadoop version 3.3.5.
• At various points, a WARN level message states Could not find Hadoop configuration via any of the supported methods (Flink configuration, environment variables). However, by looking at the source code, i can see that it should only display this message after displaying various debug messages, looking for the hadoop configuration in my system. This indicates that it can't even find the environmental variables that I've set, which is concerning.
I appreciate any help I can get, and will gladly provide additional info if prompted.Joe Karayusuf
07/13/2023, 2:55 PMChris Tabakakis
07/13/2023, 3:02 PMtaskmanager.memory.flink.size: 6000m
I'm using one of gelly's graphbuilders to read the file and construct the graph instantly. I'm not aware of the specifics of how it goes about this, but I'd assume that it has built in optimizations for such cases:
Graph<LongValue, NullValue, NullValue> graph = Graph.fromCsvReader(hdfsFilePath, env).lineDelimiterEdges(" ").keyType(LongValue.class);
Wouldn't it display an error message if it run out of memory? Something like "JVM heap space" or something like this? Something definitely goes wrong with the node that doesn't complete the first task, because every time that I run the app, flink crashes on that VM, and I have to restart the cluster. But how would I go about figuring that out, and fixing it?Joe Karayusuf
07/13/2023, 3:10 PMConnection unexpectedly closed by remote task manager you mentioned above.Joe Karayusuf
07/13/2023, 3:11 PMChris Tabakakis
07/13/2023, 3:17 PM2023-07-13 14:12:45,876 DEBUG org.apache.flink.runtime.operators.DataSourceTask [] - Starting to read input from split [0] <hdfs://10.0.1.70:9000/GraphXample/InputGraphs/graph_small.txt:0+40076936>: CHAIN DataSource (org.apache.flink.graph.GraphCsvReader) -> Map (Type conversion) -> FlatMap (FlatMap at run(TriangleEnumerator.java:69)) (5/7)
2023-07-13 14:12:47,094 DEBUG org.apache.flink.runtime.taskexecutor.TaskExecutor [] - Received heartbeat request from 4d66c7ae7a636b66f296fabcecffa9bc.
which for me, seems to indicate "working as normal".
It is possible that I've configured the memory wrong. The number i've set as the taskmanager.memory.flink.size might be larger than my actual memory. Could that be an issue?Joe Karayusuf
07/13/2023, 3:26 PMtaskmanager.memory.flink.size: 6000mChris Tabakakis
07/13/2023, 3:48 PMJoe Karayusuf
07/13/2023, 4:01 PMJoe Karayusuf
07/13/2023, 4:02 PMChris Tabakakis
07/13/2023, 4:14 PMChris Tabakakis
07/13/2023, 4:34 PMJoe Karayusuf
07/13/2023, 4:44 PMGraph object, which will definitely exceed your memory limitations once the file is multiple gigs.