New to MR3

261 views
Skip to first unread message

kauts shukla

unread,
Jul 19, 2020, 5:38:28 AM7/19/20
to MR3
We are running multiple queries on go but the only one worker node is running and auto scale is not working. Can we have some help here to pick the fish it up.

Sungwoo Park

unread,
Jul 19, 2020, 5:49:59 AM7/19/20
to MR3
In what environment are you running (Hadoop vs K8s, or on-premise or AWS)? 

If on K8s, what does the command print (where you should use your DAGAppMaster Pod name)?

kubectl log -n hivemr3 mr3master-8498-0-fftrj -f | grep -e Scale -e Scaling -e average 

Cheers,

--- Sungwoo
Message has been deleted

kauts shukla

unread,
Jul 19, 2020, 6:10:39 AM7/19/20
to MR3
PF the logs here as requested :-


kubectl logs -n hivemr3 mr3master-4925-0 -f --tail 100 | grep -e Scale -e Scaling -e average
2020-07-19T10:07:59,742  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 25.0% (1024MB / 4096MB)
2020-07-19T10:07:59,742  INFO [All-In-One] AMHostTracker: Checking for Scale-in: 1 false 3 1 5
2020-07-19T10:08:09,742  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 25.0% (1024MB / 4096MB)
2020-07-19T10:08:09,742  INFO [All-In-One] AMHostTracker: Checking for Scale-in: 1 false 3 1 5
2020-07-19T10:08:19,742  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 25.0% (1024MB / 4096MB)
2020-07-19T10:08:19,742  INFO [All-In-One] AMHostTracker: Checking for Scale-in: 1 false 3 1 5
2020-07-19T10:08:29,742  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 25.0% (1024MB / 4096MB)
2020-07-19T10:08:29,742  INFO [All-In-One] AMHostTracker: Checking for Scale-in: 1 false 3 1 5
2020-07-19T10:08:39,742  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 25.0% (1024MB / 4096MB)
2020-07-19T10:08:39,742  INFO [All-In-One] AMHostTracker: Checking for Scale-in: 1 false 3 1 5

kauts shukla

unread,
Jul 19, 2020, 6:12:38 AM7/19/20
to MR3
Few more details here:

kubectl -n hivemr3 get pods
NAME READY STATUS RESTARTS AGE
hivemr3-hiveserver2-pntj6 1/1 Running 0 47m
hivemr3-metastore-0 1/1 Running 0 48m
mr3master-4925-0 1/1 Running 0 45m
mr3worker-60ce-1 1/1 Running 0 45m

 
On Sunday, July 19, 2020 at 3:08:28 PM UTC+5:30, kauts shukla wrote:

Sungwoo Park

unread,
Jul 19, 2020, 6:32:33 AM7/19/20
to MR3
Hello,

I would suggest the following.

1. For the duration of your log sample, only one Task of 1GB is running in a ContainerWorker of 4GB. So, turn off autoscaling and check if the query is running okay. In this way, we can confirm that if there is any problem, it is due to autoscaling.

2. Then, check the configurations of autoscaling. Here is an example.

We use this setting:

<property>
  <name>mr3.enable.auto.scaling</name>
  <value>true</value>
</property>

<property>
  <name>mr3.memory.usage.check.scheme</name>
  <value>average</value>
</property>

<property>
  <name>mr3.auto.scale.out.threshold.percent</name>
  <value>80</value>
</property>

<property>
  <name>mr3.auto.scale.in.threshold.percent</name>
  <value>50</value>
</property>

After Hive-MR3 starts, the log looks like:

2020-07-19T10:06:29,511  INFO [All-In-One] TaskScheduler: All-In-One Scale-out: trying to add 1 ContainerWorker(s)
2020-07-19T10:06:35,778  INFO [All-In-One] TaskScheduler: All-In-One Auto-Scaling: in Stable with 1 running ContainerWorker(s)

--> running the first (short) query, added the first ContainerWorker

2020-07-19T10:06:38,168  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 33.3% (4096MB / 12288MB)
2020-07-19T10:06:38,169  INFO [All-In-One] TaskScheduler: All-In-One postpone Scale-in: duration 2390 milliseconds < 60 seconds
2020-07-19T10:06:48,160  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 33.3% (4096MB / 12288MB)
2020-07-19T10:06:48,160  INFO [All-In-One] TaskScheduler: All-In-One postpone Scale-in: duration 12382 milliseconds < 60 seconds
2020-07-19T10:06:58,161  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 55.6% (6826MB / 12288MB)
2020-07-19T10:07:08,159  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 66.7% (8192MB / 12288MB)
2020-07-19T10:07:18,160  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 60.0% (7372MB / 12288MB)
2020-07-19T10:07:28,159  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 50.0% (6144MB / 12288MB)
2020-07-19T10:07:28,160  INFO [All-In-One] TaskScheduler: All-In-One postpone Scale-in: duration 52382 milliseconds < 60 seconds
2020-07-19T10:07:38,159  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 42.9% (5266MB / 12288MB)
2020-07-19T10:07:38,160  INFO [All-In-One] AMHostTracker: Checking for Scale-in: 1 true 1 1 8

--> checks for scale-in
--> submitted the second (long) query

2020-07-19T10:07:48,159  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 37.5% (4608MB / 12288MB)
2020-07-19T10:07:48,159  INFO [All-In-One] AMHostTracker: Checking for Scale-in: 1 true 1 1 13
2020-07-19T10:07:58,200  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 44.4% (5461MB / 12288MB)
2020-07-19T10:07:58,200  INFO [All-In-One] AMHostTracker: Checking for Scale-in: 1 false 1 1 6
2020-07-19T10:08:08,159  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 50.0% (6144MB / 12288MB)
2020-07-19T10:08:08,160  INFO [All-In-One] AMHostTracker: Checking for Scale-in: 1 false 1 1 0
2020-07-19T10:08:18,159  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 54.5% (6702MB / 12288MB)
2020-07-19T10:08:28,159  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 58.3% (7168MB / 12288MB)
2020-07-19T10:08:38,159  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 61.5% (7561MB / 12288MB)
2020-07-19T10:08:48,159  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 64.3% (7899MB / 12288MB)
2020-07-19T10:08:58,159  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 66.7% (8192MB / 12288MB)
2020-07-19T10:09:08,159  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 68.8% (8448MB / 12288MB)
2020-07-19T10:09:18,159  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 70.6% (8673MB / 12288MB)
2020-07-19T10:09:28,159  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 72.2% (8874MB / 12288MB)
2020-07-19T10:09:38,159  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 73.7% (9054MB / 12288MB)
2020-07-19T10:09:48,159  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 75.0% (9216MB / 12288MB)
2020-07-19T10:09:58,159  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 76.2% (9362MB / 12288MB)
2020-07-19T10:10:08,159  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 77.3% (9495MB / 12288MB)
2020-07-19T10:10:18,159  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 78.3% (9616MB / 12288MB)
2020-07-19T10:10:28,159  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 79.2% (9728MB / 12288MB)
2020-07-19T10:10:38,159  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 80.0% (9830MB / 12288MB)
2020-07-19T10:10:48,159  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 80.8% (9924MB / 12288MB)
2020-07-19T10:10:48,159  INFO [All-In-One] TaskScheduler: All-In-One Scale-out: trying to add 1 ContainerWorker(s)

--> the memory usage exceeds mr3.auto.scale.out.threshold.percent, so add a new ContainerWorker

2020-07-19T10:10:54,187  INFO [All-In-One] TaskScheduler: All-In-One Auto-Scaling: in Stable with 2 running ContainerWorker(s)
2020-07-19T10:10:58,159  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 82.1% (10467MB / 12743MB)
2020-07-19T10:10:58,159  INFO [All-In-One] TaskScheduler: All-In-One Scale-out: trying to add 1 ContainerWorker(s)
2020-07-19T10:11:04,592  INFO [All-In-One] TaskScheduler: All-In-One Auto-Scaling: in Stable with 3 running ContainerWorker(s)

--> keeps adding new ContainerWorkers because the memory usage exceeds 80%

2020-07-19T10:11:08,160  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 83.9% (11410MB / 13604MB)
2020-07-19T10:11:08,160  INFO [All-In-One] TaskScheduler: All-In-One Scale-out: trying to add 1 ContainerWorker(s)
2020-07-19T10:11:14,455  INFO [All-In-One] TaskScheduler: All-In-One Auto-Scaling: in Stable with 4 running ContainerWorker(s)
2020-07-19T10:11:18,159  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 84.8% (12570MB / 14830MB)
2020-07-19T10:11:18,159  INFO [All-In-One] TaskScheduler: All-In-One Scale-out: trying to add 1 ContainerWorker(s)
2020-07-19T10:11:25,170  INFO [All-In-One] TaskScheduler: All-In-One Auto-Scaling: in Stable with 5 running ContainerWorker(s)
2020-07-19T10:11:28,160  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 85.0% (13926MB / 16384MB)
2020-07-19T10:11:28,160  INFO [All-In-One] TaskScheduler: All-In-One Scale-out: trying to add 1 ContainerWorker(s)
2020-07-19T10:11:37,112  INFO [All-In-One] TaskScheduler: All-In-One Auto-Scaling: in Stable with 6 running ContainerWorker(s)
2020-07-19T10:11:38,159  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 85.5% (15591MB / 18233MB)
2020-07-19T10:11:38,159  INFO [All-In-One] TaskScheduler: All-In-One Scale-out: trying to add 1 ContainerWorker(s)
2020-07-19T10:11:46,377  INFO [All-In-One] TaskScheduler: All-In-One Auto-Scaling: in Stable with 7 running ContainerWorker(s)
2020-07-19T10:11:48,159  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 86.2% (17536MB / 20352MB)
2020-07-19T10:11:48,159  INFO [All-In-One] TaskScheduler: All-In-One Scale-out: trying to add 1 ContainerWorker(s)
2020-07-19T10:11:57,390  INFO [All-In-One] TaskScheduler: All-In-One Auto-Scaling: in Stable with 8 running ContainerWorker(s)
2020-07-19T10:11:58,159  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 86.9% (19735MB / 22714MB)
2020-07-19T10:11:58,159  INFO [All-In-One] TaskScheduler: All-In-One Scale-out: trying to add 1 ContainerWorker(s)
2020-07-19T10:12:08,160  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 88.4% (22046MB / 24937MB)

3. If you could, please try MR3 1.1. It will be released officially tonight, but has already been uploaded and the documentation has been updated.

Cheers,

--- Sungwoo

Vikas Rana

unread,
Jul 20, 2020, 2:45:29 PM7/20/20
to MR3
@Sungwoo, Thanks for the prompt reply. I'm working along with @kauts to evaluate MR3.
These are our observation:
On setting mr3.enable.auto.scaling to false. We are seeing new PODs were getting launch by the MR3_Master.

Vikass-MacBook-Pro:hive-mr3 vrana$ kubectl -n hivemr3 logs -f mr3master-4718-0 | grep -e Scale -e Scaling -e average 

2020-07-20T16:54:50,066  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = (0GB / 0GB)

2020-07-20T16:55:00,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = (0GB / 0GB)

2020-07-20T16:55:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = (0GB / 0GB)

2020-07-20T16:55:20,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = (0GB / 0GB)

2020-07-20T16:55:30,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = (0GB / 0GB)

2020-07-20T16:55:40,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = (0GB / 0GB)

2020-07-20T16:55:50,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = (0GB / 0GB)

2020-07-20T16:56:00,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = (0GB / 0GB)

2020-07-20T16:56:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = (0GB / 0GB)

2020-07-20T16:56:20,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = (0GB / 0GB)

2020-07-20T16:56:30,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = (0GB / 0GB)

2020-07-20T16:56:40,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = (0GB / 0GB)

2020-07-20T16:56:50,064  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 25.0% (3072MB / 12288MB)

2020-07-20T16:57:00,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 25.0% (3072MB / 12288MB)

2020-07-20T16:57:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 25.0% (3072MB / 12288MB)

2020-07-20T16:57:20,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 25.0% (3072MB / 12288MB)

2020-07-20T16:57:30,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 25.0% (3072MB / 12288MB)

2020-07-20T16:57:40,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 25.0% (3072MB / 12288MB)

2020-07-20T16:57:50,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 25.0% (3072MB / 12288MB)

2020-07-20T16:58:00,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 25.0% (3072MB / 12288MB)

2020-07-20T16:58:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 25.0% (3072MB / 12288MB)

2020-07-20T16:58:20,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 25.0% (3072MB / 12288MB)

2020-07-20T16:58:30,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 25.0% (3072MB / 12288MB)

2020-07-20T16:58:40,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 25.0% (3328MB / 13312MB)

2020-07-20T16:58:50,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 25.0% (3584MB / 14336MB)

2020-07-20T16:59:00,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 25.0% (3840MB / 15360MB)

2020-07-20T16:59:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 25.0% (4096MB / 16384MB)

2020-07-20T16:59:20,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 23.5% (4096MB / 17408MB)

2020-07-20T16:59:30,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 22.2% (4096MB / 18432MB)

2020-07-20T16:59:40,064  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 21.1% (4096MB / 19456MB)

2020-07-20T16:59:50,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 20.0% (4096MB / 20480MB)

2020-07-20T17:00:00,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 19.0% (4096MB / 21504MB)

2020-07-20T17:00:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 18.2% (4096MB / 22528MB)

2020-07-20T17:00:20,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 17.4% (4096MB / 23552MB)

2020-07-20T17:00:30,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 16.7% (4096MB / 24576MB)

2020-07-20T17:00:40,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 15.6% (3840MB / 24576MB)

2020-07-20T17:00:50,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 15.3% (3754MB / 24576MB)

2020-07-20T17:01:00,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 14.9% (3669MB / 24576MB)

2020-07-20T17:01:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 14.6% (3584MB / 24576MB)

2020-07-20T17:01:20,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 16.0% (4096MB / 25600MB)

2020-07-20T17:01:30,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 17.3% (4608MB / 26624MB)

2020-07-20T17:01:40,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 18.5% (5120MB / 27648MB)

2020-07-20T17:01:50,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 19.3% (5546MB / 28672MB)

2020-07-20T17:02:00,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 20.1% (5973MB / 29696MB)

2020-07-20T17:02:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 21.1% (6485MB / 30720MB)

2020-07-20T17:02:20,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 20.4% (6485MB / 31744MB)

2020-07-20T17:02:30,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 19.8% (6485MB / 32768MB)

2020-07-20T17:02:40,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 19.2% (6485MB / 33792MB)

2020-07-20T17:02:50,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 18.1% (6314MB / 34816MB)

2020-07-20T17:03:00,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 17.1% (6144MB / 35840MB)

2020-07-20T17:03:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 16.2% (5973MB / 36864MB)

2020-07-20T17:03:20,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 15.1% (5717MB / 37888MB)

2020-07-20T17:03:30,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 14.0% (5461MB / 38912MB)

2020-07-20T17:03:40,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 13.0% (5205MB / 39936MB)

2020-07-20T17:03:50,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 12.3% (5034MB / 40960MB)

2020-07-20T17:04:00,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 11.6% (4864MB / 41984MB)

2020-07-20T17:04:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 10.7% (4608MB / 43008MB)

2020-07-20T17:04:20,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 12.0% (5290MB / 44032MB)

2020-07-20T17:04:30,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 13.3% (5973MB / 45056MB)

2020-07-20T17:04:40,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 14.4% (6656MB / 46080MB)

2020-07-20T17:04:50,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 13.8% (6485MB / 47104MB)

2020-07-20T17:05:00,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 13.1% (6314MB / 48128MB)

2020-07-20T17:05:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 12.5% (6144MB / 49152MB)

2020-07-20T17:05:20,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 11.6% (5717MB / 49152MB)

2020-07-20T17:05:30,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 11.1% (5546MB / 50176MB)

2020-07-20T17:05:40,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 10.5% (5376MB / 51200MB)

2020-07-20T17:05:50,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 10.0% (5205MB / 52224MB)

2020-07-20T17:06:00,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 9.5% (5034MB / 53248MB)

2020-07-20T17:06:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 9.0% (4864MB / 54272MB)

2020-07-20T17:06:20,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 7.7% (4266MB / 55296MB)

2020-07-20T17:06:30,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 6.5% (3669MB / 56320MB)

2020-07-20T17:06:40,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 5.7% (3242MB / 57344MB)

2020-07-20T17:06:50,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 7.2% (4181MB / 58368MB)

2020-07-20T17:07:00,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 9.1% (5376MB / 59392MB)

2020-07-20T17:07:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 11.0% (6741MB / 61098MB)

2020-07-20T17:07:20,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 13.0% (8192MB / 63146MB)

2020-07-20T17:07:30,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 12.8% (8192MB / 64170MB)

2020-07-20T17:07:40,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 12.6% (8192MB / 65194MB)

2020-07-20T17:07:50,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 12.4% (8192MB / 66218MB)

2020-07-20T17:08:00,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 12.2% (8192MB / 67242MB)

2020-07-20T17:08:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 12.0% (8192MB / 68266MB)

2020-07-20T17:08:20,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 11.8% (8192MB / 69290MB)

2020-07-20T17:08:30,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 11.8% (8448MB / 71338MB)

2020-07-20T17:08:40,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 11.6% (8533MB / 73386MB)

2020-07-20T17:08:50,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 10.7% (8106MB / 75434MB)

2020-07-20T17:09:00,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 9.6% (7424MB / 77482MB)

2020-07-20T17:09:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 8.3% (6570MB / 78848MB)

2020-07-20T17:09:20,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 7.3% (5802MB / 79872MB)

2020-07-20T17:09:30,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 8.5% (6912MB / 80896MB)

2020-07-20T17:09:40,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 10.2% (8362MB / 81920MB)

2020-07-20T17:09:50,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 11.8% (9813MB / 82944MB)

2020-07-20T17:10:00,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 13.4% (11264MB / 83968MB)

2020-07-20T17:10:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 15.0% (12714MB / 84992MB)

2020-07-20T17:10:20,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 16.5% (14165MB / 86016MB)

2020-07-20T17:10:30,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 17.9% (15360MB / 86016MB)

2020-07-20T17:10:40,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 19.2% (16554MB / 86016MB)

2020-07-20T17:10:50,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 20.6% (17749MB / 86016MB)

2020-07-20T17:11:00,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 22.0% (18944MB / 86016MB)

2020-07-20T17:11:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 23.4% (20394MB / 87040MB)

2020-07-20T17:11:20,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 24.6% (21674MB / 88064MB)

2020-07-20T17:11:30,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 25.0% (22272MB / 89088MB)

2020-07-20T17:11:40,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 25.0% (22528MB / 90112MB)

2020-07-20T17:11:50,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 24.7% (22528MB / 91136MB)

2020-07-20T17:12:00,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 22.5% (20736MB / 92160MB)

2020-07-20T17:12:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 20.3% (18944MB / 93184MB)

2020-07-20T17:12:20,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 18.2% (17152MB / 94208MB)

2020-07-20T17:12:30,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 16.1% (15360MB / 95232MB)

2020-07-20T17:12:40,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 14.1% (13568MB / 96256MB)

2020-07-20T17:12:50,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 12.1% (11776MB / 97280MB)

2020-07-20T17:13:00,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 10.2% (9984MB / 98304MB)

2020-07-20T17:13:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 8.0% (7936MB / 99328MB)

2020-07-20T17:13:20,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 5.9% (5888MB / 100352MB)

2020-07-20T17:13:30,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 3.8% (3840MB / 101376MB)

2020-07-20T17:13:40,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 1.8% (1792MB / 102400MB)

2020-07-20T17:13:50,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 103424MB)

2020-07-20T17:14:00,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 104448MB)

2020-07-20T17:14:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 105472MB)

2020-07-20T17:14:20,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 106496MB)

2020-07-20T17:14:30,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 107520MB)

2020-07-20T17:14:40,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 108544MB)

2020-07-20T17:14:50,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 109568MB)

2020-07-20T17:15:00,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:15:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:15:20,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:15:30,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:15:40,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:15:50,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:16:00,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:16:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:16:20,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:16:30,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:16:40,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:16:50,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:17:00,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:17:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:17:20,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:17:30,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:17:40,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:17:50,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:18:00,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:18:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:18:20,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:18:30,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:18:40,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:18:50,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:19:00,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:19:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:19:20,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:19:30,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:19:40,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:19:50,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:20:00,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)

2020-07-20T17:20:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)


So we have following open questions:
  • We are seeing PODs and Node [via cluster_autoscale] getting added to the cluster. But when cluster is ideal for 30+ mins, these newly added pods were not removed
    and due to which nodes not getting SCALED_IN.
  • Can you explain the logs, which show below: Does this represent cluster usage by all MAP and Reduce task in total ?
    All-In-One average memory usage = 25.0% (3328MB / 13312MB)
    And if I'm correct I don't see cluster usages is not above 25%. Is this optimal?
  • Is there a way I can scrape MR3 metrics into PROMETHEUS ?
  • What does mr3.am.min.cluster.resource.memory.mb and mr3.am.min.cluster.resource.cpu.cores represent? 
    mr3.am.min.cluster.resource.memory.mb40960Min size of memory in MB that DAGAppMaster assumes as the cluster resource when initializing Map Tasks
    mr3.am.min.cluster.resource.cpu.cores40Min number of cores that DAGAppMaster assumes as the cluster resource when initializing Map Tasks
    Previously we haven't set these values and cluster wasn't able to scale beyond 36864MB
    [All-In-One] TaskScheduler: All-In-One average memory usage = 11.3% (4181MB / 36864MB)
    Newly launched PODs were in pending state, and cluster_autoscaler was not adding node:
  • kubectl  -n hivemr3 get pods
    NAME READY STATUS RESTARTS AGE
  • hivemr3-hiveserver2-p8zjs   1/1     Running   0          21m
    hivemr3-metastore-0 1/1 Running 0 21m
    mr3master-7732-0 1/1 Running 0 17m
    mr3worker-27df-1 1/1 Running 0 17m
    mr3worker-27df-14 0/1 Pending 0 3m10s
    mr3worker-27df-15 0/1 Pending 0 2m55s
    mr3worker-27df-2 1/1 Running 0 17m
    mr3worker-27df-3 1/1 Running 0 17m
    mr3worker-27df-4 1/1 Running 0 17m
    mr3worker-27df-5 1/1 Running 0 17m
    mr3worker-27df-6 1/1 Running 0 17m
    mr3worker-27df-7 1/1 Running 0 14m
    mr3worker-27df-8 1/1 Running 0 14m
    mr3worker-27df-9 1/1 Running 0 13m
    CLUSTER_AUTOSCALER:
    I0719 11:15:24.948128       1 scale_up.go:263] Pod hivemr3/mr3worker-27df-16 is unschedulable
    I0719 11:15:24.948135 1 scale_up.go:263] Pod hivemr3/mr3worker-27df-15 is unschedulable
    I0719 11:15:24.948177 1 scale_up.go:300] Upcoming 0 nodes
    I0719 11:15:24.948212 1 scale_up.go:338] Skipping node group megatron-prod-eks-worker - max size reached
    I0719 11:15:24.948220 1 scale_up.go:416] No expansion options
    But after mr3.am.min.cluster.resource.memory.mb to 81920, mr3.am.min.cluster.resource.cpu.cores to 40. We are seeing CLUSTER was able to scale to 110592MB.
    So how does the upper limit to SCALE_OUT is controlled and determine.
    We are using m5.xlarge for MATER nodes and m5d.xlarge for WORKER nodes. Set LIMIT MAX=10, MIN=0 amd DESIRED=1 while starting up the cluster in AWS AutoSCaling

  • We are currently using MR3: mr3project/hive3:1.0, does upgrading to MR3 1.1 help?
  • As we are new to MR3, from your DOC it wasn't very clear whats the difference between MR3 HIVE3 and HIVE4.

    (Hive 3 with MR3 master and Hive 4 are built with access to Amazon S3.)


  • Where can I find change-log from MR3 1.0 to 1.1 ?
  • And we have checked your roadmap, there are some exciting new features mark to be release in MR3 1.2, and tentative timeline for that release?
Let me know if you require any more info you need from our end to answer my queries. Thanks in advance.

Cheers,
VR



On Sunday, July 19, 2020 at 3:08:28 PM UTC+5:30, kauts shukla wrote:

Vikas Rana

unread,
Jul 20, 2020, 2:57:05 PM7/20/20
to MR3
@Sungwoo,

One more update on my previous post:

After keeping cluster IDEAL for an hour/60 min. PODs were by itself started SCALING_OUT:

2020-07-20T17:13:40,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 1.8% (1792MB / 102400MB)
2020-07-20T17:13:50,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 103424MB)2020-07-20T18:12:10,063  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 110592MB)
2020-07-20T18:12:20,063 INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 106496MB)
2020-07-20T18:12:30,063 INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 98304MB)
2020-07-20T18:12:40,063 INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 90112MB)
2020-07-20T18:12:50,063 INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 81920MB)
2020-07-20T18:13:00,063 INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 73728MB)
2020-07-20T18:13:10,063 INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 65536MB)
2020-07-20T18:13:20,063 INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 57344MB)
2020-07-20T18:13:30,063 INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 48810MB)
2020-07-20T18:13:40,063 INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 39594MB)
2020-07-20T18:13:50,063 INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 30378MB)
2020-07-20T18:14:00,063 INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 21162MB)
2020-07-20T18:14:10,063 INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 11946MB)
2020-07-20T18:14:20,063 INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 6826MB)
2020-07-20T18:14:30,063 INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 5802MB)
2020-07-20T18:14:40,063 INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 4778MB)
2020-07-20T18:14:50,063 INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 3754MB)
2020-07-20T18:15:00,063 INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 2730MB)
2020-07-20T18:15:10,063 INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 1706MB)
2020-07-20T18:15:20,063 INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 0.0% (0MB / 682MB)
2020-07-20T18:15:30,063 INFO [All-In-One] TaskScheduler: All-In-One average memory usage = (0GB / 0GB)


How can we tune this SCALE_OUT interval? 
From our configs:
grep -A1 scale kubernetes/conf/mr3-site.xml
 
<name>mr3.auto.scale.out.threshold.percent</name>
  <value>80</
value>
--

 
<name>mr3.auto.scale.in.threshold.percent</name>
  <value>50</
value>
--
 
<name>mr3.auto.scale.out.grace.period.secs</name>
  <value>60</
value>
--
 
<name>mr3.auto.scale.in.delay.after.scale.out.secs</name>
  <value>60</
value>
--
 
<name>mr3.auto.scale.in.grace.period.secs</name>
  <value>60</
value>
--
 
<name>mr3.auto.scale.in.wait.dag.finished</name>
  <value>true</
value>
--
 
<name>mr3.auto.scale.out.num.increment.containers</name>
  <value>1</
value>
--
 
<name>mr3.auto.scale.in.num.decrement.hosts</name>
  <value>1</
value>
--
 
<name>mr3.auto.scale.in.min.hosts</name>
  <value>1</
value>

Cheers,
VR

On Sunday, July 19, 2020 at 3:08:28 PM UTC+5:30, kauts shukla wrote:

Vikas Rana

unread,
Jul 20, 2020, 3:19:14 PM7/20/20
to MR3
Cont  on my previous reply.. 
We have seen all WORKER nodes were removed.
Only master nodes were left:
Vikass-MacBook-Pro:helm vrana$ kubectl -nhivemr3 get pods
NAME                        READY   STATUS    RESTARTS   AGE
hivemr3-hiveserver2-b2vqz   1/1     Running   0          123m
hivemr3
-metastore-0         1/1     Running   0          124m
mr3master
-4718-0            1/1     Running   0          123m
Vikass-MacBook-Pro:helm vrana$ kubectl -nhivemr3 get nodes
NAME                                              STATUS   ROLES    AGE    VERSION
ip
-10-111-144-167.eu-central-1.compute.internal   Ready    <none>   134m   v1.16.12-eks-904af05
ip
-10-111-147-110.eu-central-1.compute.internal   Ready    <none>   133m   v1.16.12-eks-904af05
Vikass-MacBook-Pro:helm vrana$ kubectl -nhivemr3 describe node ip-10-111-144-167.eu-central-1.compute.internal | grep role
                    roles
=masters
Vikass-MacBook-Pro:helm vrana$ kubectl -nhivemr3 describe node ip-10-111-147-110.eu-central-1.compute.internal | grep role
                    roles
=masters

Also we have following property set:
<property>
<name>mr3.auto.scale.in.min.hosts</name>
<value>1</value>
</property>

Ideally we want to keep 1 node [m5d.xlarge, 16GB] and 4 worker POD on it, to keep resources any new incoming query. 

Cheers,
VR

On Sunday, July 19, 2020 at 3:08:28 PM UTC+5:30, kauts shukla wrote:

Sungwoo Park

unread,
Jul 21, 2020, 3:17:07 AM7/21/20
to MR3
1.
This definitely makes sense. hive.mr3.resource.vcores.divisor to 100 and hive.mr3.map.task.vcores/hive.mr3.reduce.task.vcores to 25.

===

I looked at your hive-site.xml, and there is an error in memory settings for ContainerWorkers. I have expanded 'Performance Tuning' page with examples. Please see 'Resources for mappers (Map Tasks), reducers (Reduce Tasks), and ContainerWorkers' in there. Your case is '1. Memory not fully utilized'.

2.
Also if I understand it correctly hive.mr3.all-in-one.containergroup.memory.mb should match the NODE total memory?
And REDUCE TASK memory 1/2 NODE memory ? hive.mr3.reduce.task.memory.mb [8GB]

===

No, a node can run a single large ContainerWorker, or many small ContainerWorkers. For typical settings, it is best to run a single ContainerWorker per node (or few ContainerWorkers on nodes with 256+GB of memory). Please see 'Elastic allocation of cluster resources' in the following page:


For an example of changing the number of ContainerWorkers, see 'Eliminating Fetch Delays':


3.
And which EC2 VM you recommend for optimal performance?
C5  // CPU Optimized
M5  // General purpose
R5. // Memory optimized ?

And how to TUNE map/reduce TASK memory and cpu for X core and Y GB node ?

===

For performance tuning, you should try using your own workload as there is no definitive formula for choosing resources. For EC2 VM, M5 is okay, but this also depends on your use case. For example, if you enable LLAP I/O, R5 might be a better choice; if your queries are computation-intensive, C5 might be a better choice.

4.
I see HIVE4 is now stable, I would like to try this out.

===

Hive 4 runs faster than Hive 3 (especially in the cloud) and Hive 4 on MR3 runs stable, but this does not mean that Hive 4 itself is stable because it is still under development. If you would like to try Hive 4 in production environments, keep in mind that the final release of Hive 4 may not be compatible with your installation (in particular, the Metastore database). I myself have seen this case early this year.

5.
We want to use MR3 without the HADOOP ecosystem as maintenance and HIVE dependency on HADOOP is very rigid.
We are using S3 for Warehouse as well as PersistentVolumes for metastore and HS2. If you recommend any configuration for optimizing network throughput and performance. 
Also we would love to TRY AWS Fargate, we are deploying in the EU region which has EKS + Fargate available.

===

For performance tuning, please see:


Performance tuning of Hive on MR3 requires some degree of knowledge on Hive.

6.
mr3.container.idle.timeout.ms will help in controlling SCALE_OUT intervals. We have 3600 sec, maybe we can try to set it to 600s to scale_down ideal POD.
Also is there any way we can keep 1 node [m5d.xlarge, 16GB] and 4 worker POD on it, to keep resources for any new incoming query. Or is this not ideal ?
Spinning new NODE might take 30+ sec to spinup, and slow initial queries.

===

Setting mr3.container.idle.timeout.ms to a huge value (e.g., MAX_INT - 1) effectively disables ContainerWorker timeout, so mr3.auto.scale.in.min.hosts is always honored.

7.
Also what are the recommended configs for DAGAppMaster POD?

===

It depends on your use case, especially the number of concurrent queries and the size of the workload. 4GB of memory is usually enough for running a single query, and 16GB of memory should take a dozen queries okay. As the memory consumption depends on the workload and characteristics of queries, you should test with your own queries and watch the memory consumption. 

The memory consumption also depends on the scheme for Task Scheduling. (The default setting should be fine for common use cases.) For more details, see:


9.
Sound Interesting, how can we do this?

===

Just reduce the resources for ContainerWorkers.

If you have other questions, please let me know.

Cheers,

--- Sungwoo

Vikas Rana

unread,
Jul 21, 2020, 3:49:32 PM7/21/20
to Sungwoo Park, kauts shukla, MR3
Hello Sungwoo,

As per our last conversation, I made following changes in hive-site and mr3-site files:

Vikass-MacBook-Pro:hive-mr3 vrana$ git diff

diff --git a/kubernetes/conf/hive-site.xml b/kubernetes/conf/hive-site.xml

index fe0577d..ae2749c 100644

--- a/kubernetes/conf/hive-site.xml

+++ b/kubernetes/conf/hive-site.xml

@@ -1052,7 +1052,7 @@

 

 <property>

   <name>hive.mr3.map.task.memory.mb</name>

-  <value>1024</value>

+  <value>4096</value>

 </property>

 

 <property>

@@ -1062,7 +1062,7 @@

 

 <property>

   <name>hive.mr3.reduce.task.memory.mb</name>

-  <value>1024</value>

+  <value>4096</value>

 </property>

 

 <property>

@@ -1072,17 +1072,17 @@

 

 <property>

   <name>hive.mr3.all-in-one.containergroup.memory.mb</name>

-  <value>4096</value>

+  <value>12288</value>

 </property>

 

 <property>

   <name>hive.mr3.all-in-one.containergroup.vcores</name>

-  <value>1</value>

+  <value>3</value>

 </property>

 

 <property>

   <name>hive.mr3.map.containergroup.memory.mb</name>

-  <value>3850</value>

+  <value>4096</value>

 </property>

 

 <property>

@@ -1092,7 +1092,7 @@

 

 <property>

   <name>hive.mr3.reduce.containergroup.memory.mb</name>

-  <value>3850</value>

+  <value>4096</value>

 </property>

 

 <property>

diff --git a/kubernetes/conf/mr3-site.xml b/kubernetes/conf/mr3-site.xml

index a66d7ce..d827f4f 100644

--- a/kubernetes/conf/mr3-site.xml

+++ b/kubernetes/conf/mr3-site.xml

@@ -108,7 +108,7 @@

 

 <property>

-  <value>3600000</value>

+  <value>300000</value>

 </property>

 

 <property>


But after this I'm seeing following error in AMaster POD:

2020-07-21T19:42:56,340  INFO [DAG1-Map 1 Dispatcher] Task$: [Map 1]task_18797_0000_1_01_000000 sets diagnostic to Some(com.datamonad.mr3.api.common.MR3Exception: FATAL: Cannot recover from this error

at com.datamonad.mr3.worker.TaskRunner.signalFatalError(TaskRunner.scala:214)

at com.datamonad.mr3.tez.TaskContext.reportFailure(TaskContext.scala:136)

at org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:322)

at org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:280)

at com.datamonad.mr3.tez.ProcessorWrapper.run(TezProcessor.scala:59)

at com.datamonad.mr3.worker.LogicalIOProcessorRuntimeTask$$anonfun$run$1.apply$mcV$sp(RuntimeTask.scala:295)

at com.datamonad.mr3.worker.LogicalIOProcessorRuntimeTask$$anonfun$run$1.apply(RuntimeTask.scala:263)

at com.datamonad.mr3.worker.LogicalIOProcessorRuntimeTask$$anonfun$run$1.apply(RuntimeTask.scala:263)

at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)

at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

at java.lang.Thread.run(Thread.java:748)

Caused by: java.lang.RuntimeException: Map operator initialization failed

at org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.init(MapRecordProcessor.java:357)

at org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:311)

... 10 more

Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Async Initialization failed. abortRequested=false

at org.apache.hadoop.hive.ql.exec.Operator.completeInitialization(Operator.java:466)

at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:400)

at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:576)

at org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:525)

at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:386)

at org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.init(MapRecordProcessor.java:338)

... 11 more

Caused by: org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError: Hash table loading exceeded memory limits for input: Map 2 numEntries: 25200000 estimatedMemoryUsage: 4253053664 effectiveThreshold: 3664143994 memoryMonitorInfo: { isLlap: true executorsPerNode: 3 maxExecutorsOverSubscribeMemory: 3 memoryOverSubscriptionFactor: 0.20000000298023224 memoryCheckInterval: 100000 noConditionalTaskSize: 1145044992 adjustedNoConditionalTaskSize: 1832071997 hashTableInflationFactor: 2.0 threshold: 3664143994 }

at org.apache.hadoop.hive.ql.exec.vector.mapjoin.fast.VectorMapJoinFastHashTableLoader.load(VectorMapJoinFastHashTableLoader.java:139)

at org.apache.hadoop.hive.ql.exec.MapJoinOperator.loadHashTableInternal(MapJoinOperator.java:358)

at org.apache.hadoop.hive.ql.exec.MapJoinOperator.loadHashTable(MapJoinOperator.java:427)

at org.apache.hadoop.hive.ql.exec.MapJoinOperator$1.run(MapJoinOperator.java:225)

at org.apache.hadoop.hive.ql.exec.MapJoinOperator$1.run(MapJoinOperator.java:222)

at java.security.AccessController.doPrivileged(Native Method)

at javax.security.auth.Subject.doAs(Subject.java:422)

at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1729)

at org.apache.hadoop.hive.ql.exec.MapJoinOperator.lambda$initializeOp$0(MapJoinOperator.java:222)

at org.apache.hadoop.hive.ql.exec.tez.LlapObjectCache.retrieve(LlapObjectCache.java:120)

at org.apache.hadoop.hive.ql.exec.tez.LlapObjectCache$1.call(LlapObjectCache.java:147)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

... 3 more

) true






--
You received this message because you are subscribed to the Google Groups "MR3" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hive-mr3+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hive-mr3/154b25db-4c5c-4cc0-b415-8f93d92dac99o%40googlegroups.com.

Vikas Rana

unread,
Jul 21, 2020, 3:59:45 PM7/21/20
to Sungwoo Park, kauts shukla, MR3
After making changes I'm seeing better utilization, but Master is unable to launch more pods:

kubectl get nodes --watch 

NAME                                              STATUS   ROLES    AGE   VERSION

ip-10-111-144-193.eu-central-1.compute.internal   Ready    <none>   10m   v1.16.12-eks-904af05

ip-10-111-145-247.eu-central-1.compute.internal   Ready    <none>   36m   v1.16.12-eks-904af05


Vikass-MacBook-Pro:hive-mr3 vrana$ kubectl -nhivemr3 get pods --watch 

NAME                        READY   STATUS    RESTARTS   AGE

hivemr3-hiveserver2-8wwrj   1/1     Running   0          32m

hivemr3-metastore-0         1/1     Running   0          32m

mr3master-8797-0            1/1     Running   0          32m

mr3worker-de2e-1            1/1     Running   0          8m57s


2020-07-21T19:40:59,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = (0GB / 0GB)

2020-07-21T19:41:09,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = (0GB / 0GB)

2020-07-21T19:41:19,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = (0GB / 0GB)

2020-07-21T19:41:29,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = (0GB / 0GB)

2020-07-21T19:41:39,334  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:41:49,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:41:59,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:42:09,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:42:19,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:42:29,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:42:39,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:42:49,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:42:59,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 96.3% (11832MB / 12288MB)

2020-07-21T19:43:09,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 93.3% (11468MB / 12288MB)

2020-07-21T19:43:19,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 93.9% (11543MB / 12288MB)

2020-07-21T19:43:29,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 94.4% (11605MB / 12288MB)

2020-07-21T19:43:39,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 91.7% (11264MB / 12288MB)

2020-07-21T19:43:49,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 88.9% (10922MB / 12288MB)

2020-07-21T19:43:59,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 80.6% (9898MB / 12288MB)

2020-07-21T19:44:09,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 72.2% (8874MB / 12288MB)

2020-07-21T19:44:19,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 63.9% (7850MB / 12288MB)

2020-07-21T19:44:29,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 55.6% (6826MB / 12288MB)

2020-07-21T19:44:39,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 47.2% (5802MB / 12288MB)

2020-07-21T19:44:49,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 38.9% (4778MB / 12288MB)

2020-07-21T19:44:59,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 33.3% (4096MB / 12288MB)

2020-07-21T19:45:09,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 36.1% (4437MB / 12288MB)

2020-07-21T19:45:19,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 36.1% (4437MB / 12288MB)

2020-07-21T19:45:29,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 36.1% (4437MB / 12288MB)

2020-07-21T19:45:39,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 38.9% (4778MB / 12288MB)

2020-07-21T19:45:49,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:45:59,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:46:09,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:46:19,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:46:29,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:46:39,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:46:49,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:46:59,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:47:09,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:47:19,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:47:29,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:47:39,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:47:49,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:47:59,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:48:09,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:48:19,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:48:29,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:48:39,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:48:49,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:48:59,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:49:09,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:49:19,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 91.7% (11264MB / 12288MB)

2020-07-21T19:49:29,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 83.3% (10240MB / 12288MB)

2020-07-21T19:49:39,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 75.0% (9216MB / 12288MB)

2020-07-21T19:49:49,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 66.7% (8192MB / 12288MB)

2020-07-21T19:49:59,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 58.3% (7168MB / 12288MB)

2020-07-21T19:50:09,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 50.0% (6144MB / 12288MB)

2020-07-21T19:50:19,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 41.7% (5120MB / 12288MB)

2020-07-21T19:50:29,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 33.3% (4096MB / 12288MB)

2020-07-21T19:50:39,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 25.0% (3072MB / 12288MB)

2020-07-21T19:50:49,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 16.7% (2048MB / 12288MB)

2020-07-21T19:50:59,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 8.3% (1024MB / 12288MB)

2020-07-21T19:51:09,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:51:19,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:51:29,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:51:39,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:51:49,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:51:59,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:52:09,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:52:19,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 100.0% (12288MB / 12288MB)

2020-07-21T19:52:29,333  INFO [All-In-One] TaskScheduler: All-In-One average memory usage = 96.3% (11832MB / 12288MB)



For your reference I've attached the master log.


Thanks in advance,


Cheers,

VR

mr3master.log

Vikas Rana

unread,
Jul 21, 2020, 5:21:59 PM7/21/20
to Sungwoo Park, kauts shukla, MR3
Continuing my previous observation, enabling auto scaling does help. But I still see above error coming once in a while:

Caused by: org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError: Hash table loading exceeded memory limits for input

 <property>

   <name>mr3.enable.auto.scaling</name>

-  <value>false</value>

+  <value>true</value>

 </property>


kubectl -nhivemr3 get pods 

NAME                        READY   STATUS    RESTARTS   AGE

hivemr3-hiveserver2-mwhkj   1/1     Running   0          11m

hivemr3-metastore-0         1/1     Running   0          11m

mr3master-3272-0            1/1     Running   0          10m

mr3worker-722f-1            1/1     Running   0          9m28s

mr3worker-722f-2            1/1     Running   0          9m23s

mr3worker-722f-3            1/1     Running   0          8m3s

mr3worker-722f-4            1/1     Running   0          7m23s

mr3worker-722f-5            0/1     Pending   0          93s

Sungwoo Park

unread,
Jul 21, 2020, 9:47:12 PM7/21/20
to MR3
If autoscaling is disabled, MR3 uses only those nodes visible to the user. So, if autoscaling is disabled, you want to start with a fixed number of live nodes.

Cheers,

--- Sungwoo

Sungwoo Park

unread,
Jul 21, 2020, 10:04:56 PM7/21/20
to MR3
Hi,

MapJoinMemoryError is an error from Hive when performing map-side join, and is not an error from MR3. It commonly occurs when the memory assigned to a Map task is too small for the query and the data being joined. (You will get the same error if you run the same query on Apache Hive 3.)

You can try to avoid MapJoinMemoryError by 1) increasing hive.auto.convert.join.noconditionaltask.size in hive-site.xml, and 2) increasing hive.mr3.map.task.memory.mb and hive.mr3.reduce.task.memory.mb in hive-site.xml.

However, if your dataset is too large or your query is too complicated, changing configurations may not help. Hive 3 does its best to complete a query even in such a case by re-compiling and re-executing the query after taking into consideration the runtime statistics, but even this second attempt may fail.

Welcome to to world of Hive performance tuning :-)

Cheers,

--- Sungwoo

Vikas Rana

unread,
Jul 25, 2020, 3:21:51 PM7/25/20
to MR3
We are trying to enable LLAP in MR3 K8s setup. We are using S3:// instread of HDFS as persistent store. While setting hive aux jar for hive-llap as follows 

<property>
<name>hive.aux.jars.path</name>
<value>hive-llap-common-3.1.2.jar,hive-llap-server-3.1.2.jar,hive-llap-tez-3.1.2.jar</value>
</property>

And we are getting following error:

Caused by: java.io.IOException: Previous writer likely failed to write s3a://megatron-prod-data/workdir/hive/hive/_mr3_session_dir/09CBB311-78D7-45F7-9042-A44C89A1388B/hive-llap-common-3.1.2.jar. Failing because I am unlikely to write too.

at org.apache.hadoop.hive.ql.exec.mr3.DAGUtils.localizeResource(DAGUtils.java:1345) ~[hive-exec-3.1.2.jar:3.1.2]

at org.apache.hadoop.hive.ql.exec.mr3.DAGUtils.addTempResources(DAGUtils.java:1234) ~[hive-exec-3.1.2.jar:3.1.2]

at org.apache.hadoop.hive.ql.exec.mr3.DAGUtils.localizeTempFilesFromConf(DAGUtils.java:1142) ~[hive-exec-3.1.2.jar:3.1.2]

at org.apache.hadoop.hive.ql.exec.mr3.session.MR3SessionImpl.setupHiveMr3Client(MR3SessionImpl.java:194) ~[hive-exec-3.1.2.jar:3.1.2]

at org.apache.hadoop.hive.ql.exec.mr3.session.MR3SessionImpl.start(MR3SessionImpl.java:131) ~[hive-exec-3.1.2.jar:3.1.2]

... 13 more

2020-07-25T16:51:48,515 ERROR [main] session.MR3Session: Failed to start MR3 Session

java.io.IOException: Previous writer likely failed to write s3a://megatron-prod-data/workdir/hive/hive/_mr3_session_dir/09CBB311-78D7-45F7-9042-A44C89A1388B/hive-llap-common-3.1.2.jar. Failing because I am unlikely to write too.


I've attached the hive-server log for your reference,

Cheers,

VR




On Sunday, July 19, 2020 at 3:08:28 PM UTC+5:30, kauts shukla wrote:
hive.log

Vikas Rana

unread,
Jul 25, 2020, 4:23:03 PM7/25/20
to MR3
Also one more thing while upgrading MR3 from 1.0 to 1.1, we have just updated image in metastore and hive yaml. But we are getting following error:
Is there any migration/changes in run-hive.sh script from 1.0 to 1.1 ?


************************************************************/
2020-07-25T17:00:15,399  INFO [main] server.HiveServer2: Starting HiveServer2
2020-07-25T17:00:15,433  WARN [main] conf.HiveConf: HiveConf of name hive.exec.orc.default.compress does not exist
2020-07-25T17:00:15,433  WARN [main] conf.HiveConf: HiveConf hive.mr3.use.daemon.shufflehandler expects INT type value
2020-07-25T17:00:15,433  WARN [main] conf.HiveConf: HiveConf of name hive.exec.orc.compression.strategy does not exist
2020-07-25T17:00:15,434  WARN [main] conf.HiveConf: HiveConf of name hive.cluster.delegation.token.renew-interval does not exist
2020-07-25T17:00:15,434  WARN [main] conf.HiveConf: HiveConf of name hive.stats.fetch.partition.stats does not exist
2020-07-25T17:00:15,434  WARN [main] conf.HiveConf: HiveConf of name hive.warehouse.subdir.inherit.perms does not exist
2020-07-25T17:00:15,434  WARN [main] conf.HiveConf: HiveConf hive.server2.thrift.port expects INT type value
2020-07-25T17:00:15,434  WARN [main] conf.HiveConf: HiveConf of name hive.exec.orc.default.stripe.size does not exist
2020-07-25T17:00:15,435  WARN [main] conf.HiveConf: HiveConf of name hive.mv.files.threads does not exist
2020-07-25T17:00:15,435  WARN [main] conf.HiveConf: HiveConf of name hive.exec.orc.encoding.strategy does not exist
Hive Session ID = 3dba4488-0aa1-4a41-8158-654a7ab6c6b1
2020-07-25T17:00:15,720  INFO [main] SessionState: Hive Session ID = 3dba4488-0aa1-4a41-8158-654a7ab6c6b1
2020-07-25T17:00:16,506  INFO [main] beanutils.FluentPropertyBeanIntrospector: Error when creating PropertyDescriptor for public final void org.apache.commons.configuration2.AbstractConfiguration.setProperty(java.lang.String,java.lang.Object)! Ignoring this property.
2020-07-25T17:00:16,602  INFO [main] impl.MetricsConfig: loaded properties from hadoop-metrics2.properties
2020-07-25T17:00:16,626  INFO [main] impl.MetricsSystemImpl: Scheduled Metric snapshot period at 10 second(s).
2020-07-25T17:00:16,626  INFO [main] impl.MetricsSystemImpl: s3a-file-system metrics system started
2020-07-25T17:00:18,673  INFO [main] Configuration.deprecation: fs.s3a.server-side-encryption-key is deprecated. Instead, use fs.s3a.server-side-encryption.key
2020-07-25T17:00:19,170  INFO [main] session.SessionState: Created HDFS directory: s3a://megatron-prod-data/workdir/hive/hive/3dba4488-0aa1-4a41-8158-654a7ab6c6b1
2020-07-25T17:00:19,236  INFO [main] session.SessionState: Created local directory: /opt/mr3-run/scratch-dir/3dba4488-0aa1-4a41-8158-654a7ab6c6b1
2020-07-25T17:00:19,446  INFO [main] session.SessionState: Created HDFS directory: s3a://megatron-prod-data/workdir/hive/hive/3dba4488-0aa1-4a41-8158-654a7ab6c6b1/_tmp_space.db
2020-07-25T17:00:19,467  INFO [main] sqlstd.SQLStdHiveAccessController: Created SQLStdHiveAccessController for session context : HiveAuthzSessionContext [sessionString=3dba4488-0aa1-4a41-8158-654a7ab6c6b1, clientType=HIVESERVER2]
2020-07-25T17:00:19,496  WARN [main] session.SessionState: METASTORE_FILTER_HOOK will be ignored, since hive.security.authorization.manager is set to instance of HiveAuthorizerFactory.
2020-07-25T17:00:20,306  INFO [main] metastore.HiveMetaStoreClient: Trying to connect to metastore with URI thrift://hivemr3-metastore-0.metastore.hivemr3.svc.cluster.local:9850
2020-07-25T17:00:20,328  INFO [main] metastore.HiveMetaStoreClient: Opened a connection to metastore, current connections: 1
2020-07-25T17:00:20,335  INFO [main] metastore.HiveMetaStoreClient: Connected to metastore.
2020-07-25T17:00:20,336  INFO [main] metastore.RetryingMetaStoreClient: RetryingMetaStoreClient proxy=class org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient ugi=hive (auth:SIMPLE) retries=24 delay=5 lifetime=0
2020-07-25T17:00:20,544  INFO [main] service.CompositeService: Operation log root directory is created: /opt/mr3-run/scratch-dir/operation_logs
2020-07-25T17:00:20,546  INFO [main] service.CompositeService: HiveServer2: Background operation thread pool size: 100
2020-07-25T17:00:20,546  INFO [main] service.CompositeService: HiveServer2: Background operation thread wait queue size: 100
2020-07-25T17:00:20,546  INFO [main] service.CompositeService: HiveServer2: Background operation thread keepalive time: 10 seconds
2020-07-25T17:00:20,548  INFO [main] service.CompositeService: Connections limit are user: 0 ipaddress: 0 user-ipaddress: 0
2020-07-25T17:00:20,555  INFO [main] service.AbstractService: Service:OperationManager is inited.
2020-07-25T17:00:20,555  INFO [main] service.AbstractService: Service:SessionManager is inited.
2020-07-25T17:00:20,555  INFO [main] service.AbstractService: Service:CLIService is inited.
2020-07-25T17:00:20,555  INFO [main] service.AbstractService: Service:ThriftBinaryCLIService is inited.
2020-07-25T17:00:20,556  INFO [main] service.AbstractService: Service:HiveServer2 is inited.
2020-07-25T17:00:20,605  WARN [main] conf.HiveConf: HiveConf of name hive.exec.orc.default.compress does not exist
2020-07-25T17:00:20,605  WARN [main] conf.HiveConf: HiveConf hive.mr3.use.daemon.shufflehandler expects INT type value
2020-07-25T17:00:20,605  WARN [main] conf.HiveConf: HiveConf of name hive.exec.orc.compression.strategy does not exist
2020-07-25T17:00:20,605  WARN [main] conf.HiveConf: HiveConf of name hive.cluster.delegation.token.renew-interval does not exist
2020-07-25T17:00:20,605  WARN [main] conf.HiveConf: HiveConf of name hive.stats.fetch.partition.stats does not exist
2020-07-25T17:00:20,606  WARN [main] conf.HiveConf: HiveConf of name hive.warehouse.subdir.inherit.perms does not exist
2020-07-25T17:00:20,606  WARN [main] conf.HiveConf: HiveConf hive.server2.thrift.port expects INT type value
2020-07-25T17:00:20,606  WARN [main] conf.HiveConf: HiveConf of name hive.exec.orc.default.stripe.size does not exist
2020-07-25T17:00:20,606  WARN [main] conf.HiveConf: HiveConf of name hive.mv.files.threads does not exist
2020-07-25T17:00:20,606  WARN [main] conf.HiveConf: HiveConf of name hive.exec.orc.encoding.strategy does not exist
2020-07-25T17:00:20,608  INFO [main] metastore.HiveMetaStoreClient: Mestastore configuration metastore.filter.hook changed from org.apache.hadoop.hive.ql.security.authorization.plugin.AuthorizationMetaStoreFilterHook to org.apache.hadoop.hive.metastore.DefaultMetaStoreFilterHookImpl
2020-07-25T17:00:20,622  INFO [main] metastore.HiveMetaStoreClient: Closed a connection to metastore, current connections: 0
Hive Session ID = 835075a6-d54f-45c4-bd2c-bc21f8e6ca46
2020-07-25T17:00:20,629  INFO [pool-5-thread-1] SessionState: Hive Session ID = 835075a6-d54f-45c4-bd2c-bc21f8e6ca46
2020-07-25T17:00:20,630  INFO [main] metastore.HiveMetaStoreClient: Trying to connect to metastore with URI thrift://hivemr3-metastore-0.metastore.hivemr3.svc.cluster.local:9850
2020-07-25T17:00:20,631  INFO [main] metastore.HiveMetaStoreClient: Opened a connection to metastore, current connections: 1
2020-07-25T17:00:20,634  INFO [main] metastore.HiveMetaStoreClient: Connected to metastore.
2020-07-25T17:00:20,634  INFO [main] metastore.RetryingMetaStoreClient: RetryingMetaStoreClient proxy=class org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient ugi=hive (auth:SIMPLE) retries=24 delay=5 lifetime=0
2020-07-25T17:00:20,696  INFO [main] events.NotificationEventPoll: Initializing lastCheckedEventId to 0
2020-07-25T17:00:20,697  INFO [main] server.HiveServer2: Web UI is disabled since port is set to 0
2020-07-25T17:00:20,700  INFO [main] session.MR3SessionManagerImpl: Setting up MR3SessionManager
2020-07-25T17:00:20,702  INFO [main] mr3.HiveMR3ClientFactory: Initializing HiveMR3ClientFactory
2020-07-25T17:00:20,702  INFO [main] session.MR3SessionManagerImpl: Setting up MR3SessionManager: serviceDiscovery/activePassiveHA/shareMr3Session = false/false/true
2020-07-25T17:00:20,913  INFO [main] session.MR3Session: Created MR3 Session Scratch Dir: s3a://megatron-prod-data/workdir/hive/hive/_mr3_session_dir/7BD202C8-6FAC-4937-BE67-8D2FE3D2F511
2020-07-25T17:00:20,913  INFO [main] session.MR3Session: Do not delete session scratch directory on non-clean exit
2020-07-25T17:00:21,117  INFO [main] mr3.DAGUtils: Skipping localizing initial session jars
2020-07-25T17:00:21,120  INFO [main] session.MR3Session: Creating HiveMR3Client (id: 7BD202C8-6FAC-4937-BE67-8D2FE3D2F511, scratch dir: s3a://megatron-prod-data/workdir/hive/hive/_mr3_session_dir/7BD202C8-6FAC-4937-BE67-8D2FE3D2F511)
2020-07-25T17:00:21,393  INFO [pool-5-thread-1] session.SessionState: Created HDFS directory: s3a://megatron-prod-data/workdir/hive/hive/835075a6-d54f-45c4-bd2c-bc21f8e6ca46
2020-07-25T17:00:21,407  INFO [pool-5-thread-1] session.SessionState: Created local directory: /opt/mr3-run/scratch-dir/835075a6-d54f-45c4-bd2c-bc21f8e6ca46
2020-07-25T17:00:21,610  INFO [main] mr3.MR3Runtime$: Initializing MR3Runtime for tez
2020-07-25T17:00:21,621  INFO [main] client.AMK8sClient$: Using the key in environment variable CLIENT_TO_AM_TOKEN_KEY
2020-07-25T17:00:21,637  INFO [main] session.MR3Session: Starting HiveMR3Client
2020-07-25T17:00:21,638  INFO [main] client.MR3Client$: Starting MR3SessionClient 7BD202C8-6FAC-4937-BE67-8D2FE3D2F511
2020-07-25T17:00:21,657  INFO [pool-5-thread-1] session.SessionState: Created HDFS directory: s3a://megatron-prod-data/workdir/hive/hive/835075a6-d54f-45c4-bd2c-bc21f8e6ca46/_tmp_space.db
2020-07-25T17:00:21,734  INFO [pool-5-thread-1] metadata.HiveMaterializedViewsRegistry: Materialized views registry has been initialized
2020-07-25T17:00:21,932  INFO [main] AMReplicationControllerContainerExtender: Created AMReplicationControllerContainerExtender: mr3project/hive3:1.1 hive WrappedArray(/opt/mr3-run/work-local-dir) WrappedArray() / hivemr3-conf-configmap /opt/mr3-run/conf / hivemr3-keytab-secret /opt/mr3-run/key / Some((hivemr3_app,hiveserver2))
2020-07-25T17:00:21,933  INFO [main] AMReplicationControllerContainerExtender: Trying to create ConfigMap mr3conf-configmap-master
2020-07-25T17:00:23,231  INFO [main] client.AMK8sClient$: Created KubernetesClient for DAGAppMaster
2020-07-25T17:00:23,232  INFO [main] client.AMK8sClient$: Using the timestamp in environment variable MR3_APPLICATION_ID_TIMESTAMP
2020-07-25T17:00:23,311  INFO [main] client.MR3Client$: Starting DAGAppMaster with ApplicationID application_13735_0000 in session mode
2020-07-25T17:00:23,323  INFO [main] client.ClientLocalResourceUtils$: Using MR3_LIB_URIS 
2020-07-25T17:00:23,326  INFO [main] client.ClientLocalResourceUtils$: Using MR3_AUX_URIS 
2020-07-25T17:00:23,329  WARN [main] client.ClientLocalResourceUtils$: Empty LocalResources from MR3_LIB_URIS
2020-07-25T17:00:23,333  INFO [main] client.ApplicationSubmissionContextBuilder: ApplicationSubmissionContextBuilder for application_13735_0000: amLocalResources = Map(), sessionLocalResources = Map()
2020-07-25T17:00:23,367  WARN [main] common.StagingDirUtils$: Base staging directory already exists: s3a://megatron-prod-data/workdir/hive/hive/_mr3_session_dir/7BD202C8-6FAC-4937-BE67-8D2FE3D2F511/staging
2020-07-25T17:00:23,421  INFO [main] common.StagingDirUtils$: Trying to get FileSystem from staging directory s3a://megatron-prod-data/workdir/hive/hive/_mr3_session_dir/7BD202C8-6FAC-4937-BE67-8D2FE3D2F511/staging
2020-07-25T17:00:23,467  WARN [main] common.StagingDirUtils$: System staging directory already exists: s3a://megatron-prod-data/workdir/hive/hive/_mr3_session_dir/7BD202C8-6FAC-4937-BE67-8D2FE3D2F511/staging/.mr3/application_13735_0000
2020-07-25T17:00:23,468  INFO [main] client.ApplicationSubmissionContextBuilder: Skip computing LocalResources for DAGAppMaster on Kubernetes
2020-07-25T17:00:23,501  INFO [main] conf.Configuration: resource-types.xml not found
2020-07-25T17:00:23,502  INFO [main] resource.ResourceUtils: Unable to find 'resource-types.xml'.
2020-07-25T17:00:23,508  INFO [main] common.EnvironmentUtils$: adding environment variable with a given value: LD_LIBRARY_PATH
2020-07-25T17:00:23,513  INFO [main] client.ApplicationSubmissionContextBuilder: getAmLaunchOpts() returns -server -Djava.net.preferIPv4Stack=true -Dhadoop.metrics.log.level=WARN -XX:+UseNUMA -XX:+UseG1GC -XX:+ResizeTLAB -Dlog4j.configurationFile=k8s-mr3-container-log4j2.properties -Djavax.security.auth.useSubjectCredsOnly=false -Djava.security.auth.login.config=/opt/mr3-run/conf/jgss.conf -Djava.security.krb5.conf=/opt/mr3-run/conf/krb5.conf -Dsun.security.jgss.debug=true -Xmx1638m
2020-07-25T17:00:23,544  INFO [main] client.ApplicationSubmissionContextBuilder: Command for launching ApplicationMaster: /opt/mr3-run/hive/run-master.sh -server -Djava.net.preferIPv4Stack=true -Dhadoop.metrics.log.level=WARN -XX:+UseNUMA -XX:+UseG1GC -XX:+ResizeTLAB -Dlog4j.configurationFile=k8s-mr3-container-log4j2.properties -Djavax.security.auth.useSubjectCredsOnly=false -Djava.security.auth.login.config=/opt/mr3-run/conf/jgss.conf -Djava.security.krb5.conf=/opt/mr3-run/conf/krb5.conf -Dsun.security.jgss.debug=true -Xmx1638m -Dmr3.root.logger=INFO -Dsun.nio.ch.bugLevel='' com.datamonad.mr3.master.DAGAppMaster --session
2020-07-25T17:00:23,562  INFO [main] client.AMK8sClient$: Checking all Services for service-master-3735-0
2020-07-25T17:00:23,620  INFO [main] client.AMK8sClient$: Service with name hiveserver2
2020-07-25T17:00:23,620  INFO [main] client.AMK8sClient$: Service with name metastore
2020-07-25T17:00:23,620  INFO [main] client.AMK8sClient$: Service with name service-master-3735-0
2020-07-25T17:00:23,621  INFO [main] client.AMK8sClient$: DAGAppMaster Service exists
2020-07-25T17:00:23,621  INFO [main] client.AMK8sClient$: Checking all Pods for DAGAppMaster Pod mr3master-3735-0
2020-07-25T17:00:24,113  INFO [main] client.AMK8sClient$: Found Pod with name hivemr3-hiveserver2-9fqv6
2020-07-25T17:00:24,113  INFO [main] client.AMK8sClient$: Found Pod with name hivemr3-hiveserver2-w9284
2020-07-25T17:00:24,113  INFO [main] client.AMK8sClient$: Found Pod with name hivemr3-metastore-0
2020-07-25T17:00:24,118  INFO [main] client.AMK8sClient$: Trying to create DAGAppMaster Pod: application_13735_0000
2020-07-25T17:00:25,109 ERROR [main] client.AMK8sClient$: Error in creating DAGAppMaster Pod: application_13735_0000
io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: POST at: https://kubernetes.default.svc/api/v1/namespaces/hivemr3/replicationcontrollers. Message: Forbidden!Configured service account doesn't have access. Service account may have been revoked. replicationcontrollers is forbidden: User "system:serviceaccount:hivemr3:hive-service-account" cannot create resource "replicationcontrollers" in API group "" in the namespace "hivemr3".
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.requestFailure(OperationSupport.java:503) ~[mr3-tez-1.0-assembly.jar:1.0]
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.assertResponseCode(OperationSupport.java:440) ~[mr3-tez-1.0-assembly.jar:1.0]
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:406) ~[mr3-tez-1.0-assembly.jar:1.0]
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:365) ~[mr3-tez-1.0-assembly.jar:1.0]
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleCreate(OperationSupport.java:234) ~[mr3-tez-1.0-assembly.jar:1.0]
at io.fabric8.kubernetes.client.dsl.base.BaseOperation.handleCreate(BaseOperation.java:796) ~[mr3-tez-1.0-assembly.jar:1.0]
at io.fabric8.kubernetes.client.dsl.base.BaseOperation.create(BaseOperation.java:326) ~[mr3-tez-1.0-assembly.jar:1.0]
at io.fabric8.kubernetes.client.dsl.base.BaseOperation.create(BaseOperation.java:322) ~[mr3-tez-1.0-assembly.jar:1.0]
at com.datamonad.mr3.client.AMK8sClient.createK8sPod(AMK8sClient.scala:248) ~[mr3-tez-1.0-assembly.jar:1.0]
at com.datamonad.mr3.client.AMK8sClient.tryCreateK8sMasterPod(AMK8sClient.scala:198) ~[mr3-tez-1.0-assembly.jar:1.0]
at com.datamonad.mr3.client.AMK8sClient.submitApplication(AMK8sClient.scala:92) ~[mr3-tez-1.0-assembly.jar:1.0]
at com.datamonad.mr3.client.MR3SessionClientImpl.startApplication(MR3SessionClientImpl.scala:200) ~[mr3-tez-1.0-assembly.jar:1.0]
at com.datamonad.mr3.client.MR3SessionClientImpl.start(MR3SessionClientImpl.scala:72) ~[mr3-tez-1.0-assembly.jar:1.0]
at org.apache.hadoop.hive.ql.exec.mr3.HiveMR3ClientImpl.start(HiveMR3ClientImpl.java:80) ~[hive-exec-3.1.2.jar:3.1.2]
at org.apache.hadoop.hive.ql.exec.mr3.session.MR3SessionImpl.start(MR3SessionImpl.java:134) ~[hive-exec-3.1.2.jar:3.1.2]
at org.apache.hadoop.hive.ql.exec.mr3.session.MR3SessionManagerImpl.createSession(MR3SessionManagerImpl.java:393) ~[hive-exec-3.1.2.jar:3.1.2]
at org.apache.hadoop.hive.ql.exec.mr3.session.MR3SessionManagerImpl.setup(MR3SessionManagerImpl.java:162) ~[hive-exec-3.1.2.jar:3.1.2]
at org.apache.hive.service.server.HiveServer2.init(HiveServer2.java:400) ~[hive-service-3.1.2.jar:3.1.2]
at org.apache.hive.service.server.HiveServer2.startHiveServer2(HiveServer2.java:942) ~[hive-service-3.1.2.jar:3.1.2]
at org.apache.hive.service.server.HiveServer2.access$1400(HiveServer2.java:132) ~[hive-service-3.1.2.jar:3.1.2]
at org.apache.hive.service.server.HiveServer2$StartOptionExecutor.execute(HiveServer2.java:1208) ~[hive-service-3.1.2.jar:3.1.2]
at org.apache.hive.service.server.HiveServer2.main(HiveServer2.java:1052) ~[hive-service-3.1.2.jar:3.1.2]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_232]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_232]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_232]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_232]
at org.apache.hadoop.util.RunJar.run(RunJar.java:318) ~[hadoop-common-3.1.2.jar:?]
at org.apache.hadoop.util.RunJar.main(RunJar.java:232) ~[hadoop-common-3.1.2.jar:?]
2020-07-25T17:00:26,123  INFO [main] client.AMK8sClient$: Checking all Pods for DAGAppMaster Pod mr3master-3735-0
2020-07-25T17:00:26,137  INFO [main] client.AMK8sClient$: Found Pod with name hivemr3-hiveserver2-9fqv6
2020-07-25T17:00:26,137  INFO [main] client.AMK8sClient$: Found Pod with name hivemr3-hiveserver2-w9284
2020-07-25T17:00:26,137  INFO [main] client.AMK8sClient$: Found Pod with name hivemr3-metastore-0
2020-07-25T17:00:27,137  INFO [main] client.AMK8sClient$: Checking all Pods for DAGAppMaster Pod mr3master-3735-0
2020-07-25T17:00:27,147  INFO [main] client.AMK8sClient$: Found Pod with name hivemr3-hiveserver2-9fqv6
2020-07-25T17:00:27,147  INFO [main] client.AMK8sClient$: Found Pod with name hivemr3-hiveserver2-w9284
2020-07-25T17:00:27,147  INFO [main] client.AMK8sClient$: Found Pod with name hivemr3-metastore-0
2020-07-25T17:00:28,147  INFO [main] client.AMK8sClient$: Checking all Pods for DAGAppMaster Pod mr3master-3735-0
2020-07-25T17:00:28,156  INFO [main] client.AMK8sClient$: Found Pod with name hivemr3-hiveserver2-9fqv6
2020-07-25T17:00:28,156  INFO [main] client.AMK8sClient$: Found Pod with name hivemr3-hiveserver2-w9284
2020-07-25T17:00:28,156  INFO [main] client.AMK8sClient$: Found Pod with name hivemr3-metastore-0


On Sunday, July 19, 2020 at 3:08:28 PM UTC+5:30, kauts shukla wrote:

Sungwoo Park

unread,
Jul 25, 2020, 10:30:14 PM7/25/20
to MR3
On K8s, you don't have to set hive.aux.jars.path because all these jar files are already included in the classpath. So, leave this configuration key empty:

<property>
  <name>hive.aux.jars.path</name>
  <value></value>
</property>

In you case, "Failing because I am unlikely to write too" occurs because MR3 fails to find hive-llap-common-3.1.2.jar,hive-llap-server-3.1.2.jar,hive-llap-tez-3.1.2.jar. hive.aux.jars.path expects full paths, and your value contains relative paths, so MR3 looks for these files in the working directory (/opt/mr3-run/hive) but fails.

Cheers,

--- Sungwoo

Sungwoo Park

unread,
Jul 25, 2020, 10:43:37 PM7/25/20
to MR3
1.
Yes, there are a few breaking changes.

1) yaml/hive-role.yaml should allow ReplicationController.

- apiGroups: [""]
  resources: ["replicationcontrollers"]
  verbs: ["get", "watch", "list", "create", "delete"]

2) hive.mr3.use.daemon.shufflehandler in hive-site.xml now specifies the number of shuffle handlers in each worker Pod. (It is no longer a Boolean value.) You can start with the default value of 1, and later change it for performance tuning. For the effect of increasing the value, please see:


For complete changes, clone the git repo mr3-run-k8s, and run:

git diff ed7cfe6ee7f7bc05513a7b770eadceac8dfee685..d058568399475011252083ce702d46edf80cfa04

If you would like to you MR3 1.1, I suggest you clone the repo and start with a fresh copy of mr3-run-k8s.

2.
If you would like to enable LLAP I/O (which is different from LLAP), please check out this page first for setting memory:


In Hive on MR3, there is no LLAP, and even without LLAP, it runs as fast as Hive-LLAP (and much faster for concurrent queries).

Cheers,

--- Sungwoo

rana.v...@gmail.com

unread,
Aug 13, 2020, 4:41:46 PM8/13/20
to MR3
@Sungwoo thanks to you we were able to RUN our hive queries on MR3 1.1 successfully.

When we try to submit query from HUE [running in same k8s cluster as pod] to hiveserver via K8s service endpoint we are seeing following error:

2020-08-10T17:31:05,593 ERROR [HiveServer2-Handler-Pool: Thread-32] server.TThreadPoolServer: Error occurred during processing of message. java.lang.RuntimeException: org.apache.thrift.transport.TSaslTransportException: No data or no sasl data in the stream at org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:219) ~[hive-exec-3.1.2.jar:3.1.2] at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:269) ~[hive-exec-3.1.2.jar:3.1.2] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_232] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_232] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232] Caused by: org.apache.thrift.transport.TSaslTransportException: No data or no sasl data in the stream at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:328) ~[hive-exec-3.1.2.jar:3.1.2] at org.apache.thrift.transport.TSaslServerTransport.open(TSaslServerTransport.java:41) ~[hive-exec-3.1.2.jar:3.1.2] at org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:216) ~[hive-exec-3.1.2.jar:3.1.2] ... 4 more 2020-08-10T17:31:14,475 ERROR [HiveServer2-Handler-Pool: Thread-32] server.TThreadPoolServer: Error occurred during processing of message. java.lang.RuntimeException: org.apache.thrift.transport.TSaslTransportException: No data or no sasl data in the stream at org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:219) ~[hive-exec-3.1.2.jar:3.1.2] at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:269) ~[hive-exec-3.1.2.jar:3.1.2] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_232] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_232] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232] Caused by: org.apache.thrift.transport.TSaslTransportException: No data or no sasl data in the stream at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:328) ~[hive-exec-3.1.2.jar:3.1.2] at org.apache.thrift.transport.TSaslServerTransport.open(TSaslServerTransport.java:41) ~[hive-exec-3.1.2.jar:3.1.2] at org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:216) ~[hive-exec-3.1.2.jar:3.1.2] ... 4 more

And looks like its due to this:
https://community.cloudera.com/t5/Support-Questions/Hive-server-2-thrift-error/td-p/106810
https://cloudera.ericlin.me/2017/09/no-data-or-no-sasl-data-in-the-stream-error-in-hiveserver2-log/
https://issues.apache.org/jira/browse/HIVE-12754

These errors are not FATAL, but any pointers to suppress them?

rana.v...@gmail.com

unread,
Aug 13, 2020, 5:06:55 PM8/13/20
to MR3
And we would like to explore running Mr3 on AWS fargate as it provide true server-less capabilities and avoid new EC2 launch delay.

Our MR3 setup on EKS having warehouse and persistent storage [not in EFS] in S3. 

So please share the steps to deploy Mr3 on fargate and open challenges/blockers if any.

Now AWS Fargate 1.4.0 onwards provide some task ephemeral storage, which is very important for running workload which require persistence layer.
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/fargate-task-storage.html

Sungwoo Park

unread,
Aug 13, 2020, 10:40:01 PM8/13/20
to MR3
Please see another thread 'ping related warning/error in the log - no data or no SASL in the stream' in this Google Group. The solution is on the following page:


However, this requires the user to compile Hive for MR3 and rebuild the Docker image. If everybody wants to see these messages suppressed by default, let me update the Docker image in MR3 1.2.

Cheers,

--- Sungwoo

Sungwoo Park

unread,
Aug 13, 2020, 10:49:25 PM8/13/20
to MR3
Hive on MR3 on Fargate is still under development, and will be included in MR3 1.2. With the release of MR3 1.2, we will create a new page on running MR3 on Fargate, so please wait until MR3 1.2 is released.

Note that Hive on MR3 on Fargate requires HiveServer2 and DAGAppMaster Pods to be running all the time. Only ContainerWorker Pods are created on Fargate when necessary. As such, it is close to serverless setup, but not truly serverless (like Google BigQuery).

Cheers,

--- Sungwoo

Vikas Rana

unread,
Aug 14, 2020, 7:39:47 AM8/14/20
to Sungwoo Park, MR3
Hi Sungwoo,

I would like to understand the behaviour if we hit MR3 512 GB aggregated worker memory limit, as mentioned in your license docs and faqs:
https://www.datamonad.com/faqs/
https://www.datamonad.com/services/

Q. What restrictions does the MR3 distribution have?

A. On Kubernetes, Hive on MR3 can use up to 512 gigabytes for the aggregate memory of worker Pods. For example, the user can use 16 nodes each with 32 gigabytes of memory or 8 nodes each with 64 gigabytes of memory for worker Pods. On Hadoop, there is no limit on the aggregate memory of worker Containers.


Will the cluster won't do autoscale beyond 512 GB memory?
And is the memory limit applicable if we use in our ORG internally or dev/stage env.




--
You received this message because you are subscribed to the Google Groups "MR3" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hive-mr3+u...@googlegroups.com.

Sungwoo Park

unread,
Aug 14, 2020, 9:09:01 AM8/14/20
to MR3

Q. What restrictions does the MR3 distribution have?

A. On Kubernetes, Hive on MR3 can use up to 512 gigabytes for the aggregate memory of worker Pods. For example, the user can use 16 nodes each with 32 gigabytes of memory or 8 nodes each with 64 gigabytes of memory for worker Pods. On Hadoop, there is no limit on the aggregate memory of worker Containers.


Will the cluster won't do autoscale beyond 512 GB memory?

No, DAGAppMaster does not create new ContainerWorkers once it reaches the 512GB limit.
 
And is the memory limit applicable if we use in our ORG internally or dev/stage env.

Yes, it is still applicable (because it is set in the MR3 distribution and the Docker image on DockerHub). If you would like to evaluate MR3 with a higher memory limit, you can ask DataMonad for a custom MR distribution which is valid for 2 months. From FAQs of DataMonad:

Q. Can I evaluate Hive on MR3 on Kubernetes with a higher limit on the aggregate memory of worker Pods? 
A. Yes, we can provide the user with a custom MR3 distribution which is valid for two months. After two months of evaluation, the user can decide whether or not to purchase a commercial use license. 

In the future, we plan to provide a service on Amazon EKS/Fargate in which there is no limit on the aggregate memory of ContainerWorker Pods and the user pays only for the duration of using Docker image packaged by DataMonad. Please note that we will perhaps reduce the limit to 256GB or 128GB from MR3 1.2. (Previously it was 1TB.)

Cheers,

--- Sungwoo

rana.v...@gmail.com

unread,
Aug 16, 2020, 5:41:13 PM8/16/20
to MR3
@Sungwoo

We are seeing S3 connection timing out due to deadlock in thread pool, which may be related to https://issues.apache.org/jira/browse/HADOOP-13826

ERROR in worker PODs:
2020-08-16T21:15:00,627  WARN [DAG-12-5-1] s3a.S3AInstrumentation: Closing output stream statistics while data is still marked as pending upload in OutputStreamStatistics{blocksSubmitted=1, blocksInQueue=1, blocksActive=0, blockUploadsCompleted=0, blockUploadsFailed=0, bytesPendingUpload=3336, bytesUploaded=0, blocksAllocated=1, blocksReleased=1, blocksActivelyAllocated=0, exceptionsInMultipartFinalize=0, transferDuration=0 ms, queueDuration=0 ms, averageQueueTime=0 ms, totalUploadDuration=0 ms, effectiveBandwidth=0.0 bytes/s}
2020-08-16T21:15:00,642  WARN [DAG-12-5-1] exec.SelectOperator: Caught exception while closing operator: java.io.InterruptedIOException: put on warehouse/data/closure_v2/.hive-staging_hive_2020-08-16_20-59-19_998_3887420152144948273-1/_task_tmp.-ext-10000/dt=2020-04-23/hr=23/_tmp.000014_0: com.amazonaws.SdkClientException: Unable to execute HTTP request: Timeout waiting for connection from pool
org.apache.hadoop.hive.ql.metadata.HiveException: java.io.InterruptedIOException: put on warehouse/data/closure_v2/.hive-staging_hive_2020-08-16_20-59-19_998_3887420152144948273-1/_task_tmp.-ext-10000/dt=2020-04-23/hr=23/_tmp.000014_0: com.amazonaws.SdkClientException: Unable to execute HTTP request: Timeout waiting for connection from pool
at org.apache.hadoop.hive.ql.exec.FileSinkOperator$FSPaths.closeWriters(FileSinkOperator.java:202) ~[hive-exec-3.1.2.jar:3.1.2]
at org.apache.hadoop.hive.ql.exec.FileSinkOperator.closeOp(FileSinkOperator.java:1276) ~[hive-exec-3.1.2.jar:3.1.2]
at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:736) ~[hive-exec-3.1.2.jar:3.1.2]
at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:760) ~[hive-exec-3.1.2.jar:3.1.2]
at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:760) ~[hive-exec-3.1.2.jar:3.1.2]
at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:760) ~[hive-exec-3.1.2.jar:3.1.2]
at org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.close(MapRecordProcessor.java:467) ~[hive-exec-3.1.2.jar:3.1.2]
at org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:334) ~[hive-exec-3.1.2.jar:3.1.2]
at org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:280) ~[hive-exec-3.1.2.jar:3.1.2]
at com.datamonad.mr3.tez.ProcessorWrapper.run(TezProcessor.scala:59) ~[mr3-tez-1.0-assembly.jar:1.0]
at com.datamonad.mr3.worker.LogicalIOProcessorRuntimeTask$$anonfun$run$1.apply$mcV$sp(RuntimeTask.scala:295) ~[mr3-tez-1.0-assembly.jar:1.0]
at com.datamonad.mr3.worker.LogicalIOProcessorRuntimeTask$$anonfun$run$1.apply(RuntimeTask.scala:263) ~[mr3-tez-1.0-assembly.jar:1.0]
at com.datamonad.mr3.worker.LogicalIOProcessorRuntimeTask$$anonfun$run$1.apply(RuntimeTask.scala:263) ~[mr3-tez-1.0-assembly.jar:1.0]
at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24) ~[mr3-tez-1.0-assembly.jar:1.0]
at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24) ~[mr3-tez-1.0-assembly.jar:1.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_232]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_232]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]
Caused by: java.io.InterruptedIOException: put on warehouse/data/closure_v2/.hive-staging_hive_2020-08-16_20-59-19_998_3887420152144948273-1/_task_tmp.-ext-10000/dt=2020-04-23/hr=23/_tmp.000014_0: com.amazonaws.SdkClientException: Unable to execute HTTP request: Timeout waiting for connection from pool
at org.apache.hadoop.fs.s3a.S3AUtils.translateInterruptedException(S3AUtils.java:340) ~[hadoop-aws-3.1.2.jar:?]
at org.apache.hadoop.fs.s3a.S3AUtils.translateException(S3AUtils.java:171) ~[hadoop-aws-3.1.2.jar:?]
at org.apache.hadoop.fs.s3a.Invoker.once(Invoker.java:111) ~[hadoop-aws-3.1.2.jar:?]
at org.apache.hadoop.fs.s3a.Invoker.lambda$retry$3(Invoker.java:265) ~[hadoop-aws-3.1.2.jar:?]
at org.apache.hadoop.fs.s3a.Invoker.retryUntranslated(Invoker.java:322) ~[hadoop-aws-3.1.2.jar:?]
at org.apache.hadoop.fs.s3a.Invoker.retry(Invoker.java:261) ~[hadoop-aws-3.1.2.jar:?]
at org.apache.hadoop.fs.s3a.Invoker.retry(Invoker.java:236) ~[hadoop-aws-3.1.2.jar:?]
at org.apache.hadoop.fs.s3a.WriteOperationHelper.retry(WriteOperationHelper.java:123) ~[hadoop-aws-3.1.2.jar:?]
at org.apache.hadoop.fs.s3a.WriteOperationHelper.putObject(WriteOperationHelper.java:424) ~[hadoop-aws-3.1.2.jar:?]
at org.apache.hadoop.fs.s3a.S3ABlockOutputStream.lambda$putObject$0(S3ABlockOutputStream.java:433) ~[hadoop-aws-3.1.2.jar:?]
at org.apache.hadoop.util.SemaphoredDelegatingExecutor$CallableWithPermitRelease.call(SemaphoredDelegatingExecutor.java:219) ~[hadoop-common-3.1.2.jar:?]
at org.apache.hadoop.util.SemaphoredDelegatingExecutor$CallableWithPermitRelease.call(SemaphoredDelegatingExecutor.java:219) ~[hadoop-common-3.1.2.jar:?]
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:108) ~[guava-19.0.jar:?]
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:41) ~[guava-19.0.jar:?]
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:77) ~[guava-19.0.jar:?]
... 3 more
Caused by: com.amazonaws.SdkClientException: Unable to execute HTTP request: Timeout waiting for connection from pool
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleRetryableException(AmazonHttpClient.java:1114) ~[aws-java-sdk-bundle-1.11.271.jar:?]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1064) ~[aws-java-sdk-bundle-1.11.271.jar:?]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:743) ~[aws-java-sdk-bundle-1.11.271.jar:?]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:717) ~[aws-java-sdk-bundle-1.11.271.jar:?]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:699) ~[aws-java-sdk-bundle-1.11.271.jar:?]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:667) ~[aws-java-sdk-bundle-1.11.271.jar:?]
at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:649) ~[aws-java-sdk-bundle-1.11.271.jar:?]
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:513) ~[aws-java-sdk-bundle-1.11.271.jar:?]
at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4325) ~[aws-java-sdk-bundle-1.11.271.jar:?]
at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4272) ~[aws-java-sdk-bundle-1.11.271.jar:?]
at com.amazonaws.services.s3.AmazonS3Client.putObject(AmazonS3Client.java:1749) ~[aws-java-sdk-bundle-1.11.271.jar:?]
at org.apache.hadoop.fs.s3a.S3AFileSystem.putObjectDirect(S3AFileSystem.java:1531) ~[hadoop-aws-3.1.2.jar:?]
at org.apache.hadoop.fs.s3a.WriteOperationHelper.lambda$putObject$5(WriteOperationHelper.java:426) ~[hadoop-aws-3.1.2.jar:?]
at org.apache.hadoop.fs.s3a.Invoker.once(Invoker.java:109) ~[hadoop-aws-3.1.2.jar:?]
at org.apache.hadoop.fs.s3a.Invoker.lambda$retry$3(Invoker.java:265) ~[hadoop-aws-3.1.2.jar:?]
at org.apache.hadoop.fs.s3a.Invoker.retryUntranslated(Invoker.java:322) ~[hadoop-aws-3.1.2.jar:?]
at org.apache.hadoop.fs.s3a.Invoker.retry(Invoker.java:261) ~[hadoop-aws-3.1.2.jar:?]
at org.apache.hadoop.fs.s3a.Invoker.retry(Invoker.java:236) ~[hadoop-aws-3.1.2.jar:?]
at org.apache.hadoop.fs.s3a.WriteOperationHelper.retry(WriteOperationHelper.java:123) ~[hadoop-aws-3.1.2.jar:?]
at org.apache.hadoop.fs.s3a.WriteOperationHelper.putObject(WriteOperationHelper.java:424) ~[hadoop-aws-3.1.2.jar:?]
at org.apache.hadoop.fs.s3a.S3ABlockOutputStream.lambda$putObject$0(S3ABlockOutputStream.java:433) ~[hadoop-aws-3.1.2.jar:?]
at org.apache.hadoop.util.SemaphoredDelegatingExecutor$CallableWithPermitRelease.call(SemaphoredDelegatingExecutor.java:219) ~[hadoop-common-3.1.2.jar:?]
at org.apache.hadoop.util.SemaphoredDelegatingExecutor$CallableWithPermitRelease.call(SemaphoredDelegatingExecutor.java:219) ~[hadoop-common-3.1.2.jar:?]
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:108) ~[guava-19.0.jar:?]
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:41) ~[guava-19.0.jar:?]
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:77) ~[guava-19.0.jar:?]
... 3 more

And because of this deadlock, we are seeing AM keep adding pod, and cluster utilisation stuck at 100%

2020-08-16T20:59:31,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = (0GB / 0GB)
2020-08-16T20:59:41,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = (0GB / 0GB)
2020-08-16T20:59:51,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = (0GB / 0GB)
2020-08-16T21:00:01,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = (0GB / 0GB)
2020-08-16T21:00:11,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = (0GB / 0GB)
2020-08-16T21:00:14,850  INFO [All-In-One] TaskScheduler: All-In-One Scale-out: trying to add 1 ContainerWorker(s)
2020-08-16T21:00:18,761  INFO [All-In-One] TaskScheduler: All-In-One Auto-Scaling: in Stable with 1 running ContainerWorker(s)
2020-08-16T21:00:21,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (43008MB / 43008MB)
2020-08-16T21:00:21,917  INFO [All-In-One] TaskScheduler: All-In-One Scale-out: trying to add 1 ContainerWorker(s)
2020-08-16T21:00:31,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (43008MB / 43008MB)
2020-08-16T21:00:41,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (43008MB / 43008MB)
2020-08-16T21:00:51,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (43008MB / 43008MB)
2020-08-16T21:01:01,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (43008MB / 43008MB)
2020-08-16T21:01:11,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (43008MB / 43008MB)
2020-08-16T21:01:21,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (43008MB / 43008MB)
2020-08-16T21:01:21,917  WARN [All-In-One] TaskScheduler: All-In-One leaves ScaleOut with 1 ContainerRequest(s)
2020-08-16T21:01:21,917  INFO [All-In-One] TaskScheduler: All-In-One Auto-Scaling: in Stable with 1 running ContainerWorker(s)
2020-08-16T21:01:31,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (43008MB / 43008MB)
2020-08-16T21:01:31,917  INFO [All-In-One] TaskScheduler: All-In-One Scale-out: trying to add 1 ContainerWorker(s)
2020-08-16T21:01:41,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (43008MB / 43008MB)
2020-08-16T21:01:51,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (43008MB / 43008MB)
2020-08-16T21:02:01,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (43008MB / 43008MB)
2020-08-16T21:02:11,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (43008MB / 43008MB)
2020-08-16T21:02:21,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (43008MB / 43008MB)
2020-08-16T21:02:24,895  INFO [All-In-One] TaskScheduler: All-In-One Auto-Scaling: in Stable with 2 running ContainerWorker(s)
2020-08-16T21:02:31,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (86016MB / 86016MB)
2020-08-16T21:02:31,917  INFO [All-In-One] TaskScheduler: All-In-One Scale-out: trying to add 1 ContainerWorker(s)
2020-08-16T21:02:41,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (86016MB / 86016MB)
2020-08-16T21:02:51,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (86016MB / 86016MB)
2020-08-16T21:03:01,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (86016MB / 86016MB)
2020-08-16T21:03:11,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (86016MB / 86016MB)
2020-08-16T21:03:21,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (86016MB / 86016MB)
2020-08-16T21:03:25,231  INFO [All-In-One] TaskScheduler: All-In-One Auto-Scaling: in Stable with 3 running ContainerWorker(s)
2020-08-16T21:03:31,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (129024MB / 129024MB)
2020-08-16T21:03:31,917  INFO [All-In-One] TaskScheduler: All-In-One Scale-out: trying to add 1 ContainerWorker(s)
2020-08-16T21:03:41,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (129024MB / 129024MB)
2020-08-16T21:03:51,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (129024MB / 129024MB)
2020-08-16T21:04:01,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (129024MB / 129024MB)
2020-08-16T21:04:11,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (129024MB / 129024MB)
2020-08-16T21:04:21,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (129024MB / 129024MB)
2020-08-16T21:04:27,221  INFO [All-In-One] TaskScheduler: All-In-One Auto-Scaling: in Stable with 4 running ContainerWorker(s)
2020-08-16T21:04:31,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (172032MB / 172032MB)
2020-08-16T21:04:31,917  INFO [All-In-One] TaskScheduler: All-In-One Scale-out: trying to add 1 ContainerWorker(s)
2020-08-16T21:04:41,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (172032MB / 172032MB)
2020-08-16T21:04:51,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (172032MB / 172032MB)
2020-08-16T21:05:01,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (172032MB / 172032MB)
2020-08-16T21:05:11,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (172032MB / 172032MB)
2020-08-16T21:05:21,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (172032MB / 172032MB)
2020-08-16T21:05:31,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (172032MB / 172032MB)
2020-08-16T21:05:31,917  WARN [All-In-One] TaskScheduler: All-In-One leaves ScaleOut with 1 ContainerRequest(s)
2020-08-16T21:05:31,917  INFO [All-In-One] TaskScheduler: All-In-One Auto-Scaling: in Stable with 4 running ContainerWorker(s)
2020-08-16T21:05:41,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (215040MB / 215040MB)
2020-08-16T21:05:41,917  INFO [All-In-One] TaskScheduler: All-In-One Scale-out: trying to add 1 ContainerWorker(s)
2020-08-16T21:05:51,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (215040MB / 215040MB)
2020-08-16T21:06:01,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (215040MB / 215040MB)
2020-08-16T21:06:11,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (215040MB / 215040MB)
2020-08-16T21:06:21,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (215040MB / 215040MB)
2020-08-16T21:06:31,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (215040MB / 215040MB)
2020-08-16T21:06:35,950  INFO [All-In-One] TaskScheduler: All-In-One Auto-Scaling: in Stable with 6 running ContainerWorker(s)
2020-08-16T21:06:41,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (258048MB / 258048MB)
2020-08-16T21:06:41,917  INFO [All-In-One] TaskScheduler: All-In-One Scale-out: trying to add 1 ContainerWorker(s)
2020-08-16T21:06:51,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (258048MB / 258048MB)
2020-08-16T21:07:01,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (258048MB / 258048MB)
2020-08-16T21:07:11,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (258048MB / 258048MB)
2020-08-16T21:07:21,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (258048MB / 258048MB)
2020-08-16T21:07:31,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (258048MB / 258048MB)
2020-08-16T21:07:40,327  INFO [All-In-One] TaskScheduler: All-In-One Auto-Scaling: in Stable with 7 running ContainerWorker(s)
2020-08-16T21:07:41,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (301056MB / 301056MB)
2020-08-16T21:07:41,917  INFO [All-In-One] TaskScheduler: All-In-One Scale-out: trying to add 1 ContainerWorker(s)
2020-08-16T21:07:51,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (301056MB / 301056MB)
2020-08-16T21:08:01,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (301056MB / 301056MB)
2020-08-16T21:08:11,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (301056MB / 301056MB)
2020-08-16T21:08:21,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (301056MB / 301056MB)
2020-08-16T21:08:31,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (301056MB / 301056MB)
2020-08-16T21:08:37,013  INFO [All-In-One] TaskScheduler: All-In-One Auto-Scaling: in Stable with 8 running ContainerWorker(s)
2020-08-16T21:08:41,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (344064MB / 344064MB)
2020-08-16T21:08:41,917  INFO [All-In-One] TaskScheduler: All-In-One Scale-out: trying to add 1 ContainerWorker(s)
2020-08-16T21:08:51,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (344064MB / 344064MB)
2020-08-16T21:09:01,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (344064MB / 344064MB)
2020-08-16T21:09:11,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (344064MB / 344064MB)
2020-08-16T21:09:21,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (344064MB / 344064MB)
2020-08-16T21:09:31,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (344064MB / 344064MB)
2020-08-16T21:09:41,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (344064MB / 344064MB)
2020-08-16T21:09:41,917  WARN [All-In-One] TaskScheduler: All-In-One leaves ScaleOut with 1 ContainerRequest(s)
2020-08-16T21:09:41,917  INFO [All-In-One] TaskScheduler: All-In-One Auto-Scaling: in Stable with 8 running ContainerWorker(s)
2020-08-16T21:09:51,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (387072MB / 387072MB)
2020-08-16T21:09:51,917  INFO [All-In-One] TaskScheduler: All-In-One Scale-out: trying to add 1 ContainerWorker(s)
2020-08-16T21:10:01,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (387072MB / 387072MB)
2020-08-16T21:10:11,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (387072MB / 387072MB)
2020-08-16T21:10:21,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (387072MB / 387072MB)
2020-08-16T21:10:31,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (387072MB / 387072MB)
2020-08-16T21:10:41,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (387072MB / 387072MB)
2020-08-16T21:10:51,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (387072MB / 387072MB)
2020-08-16T21:10:51,917  WARN [All-In-One] TaskScheduler: All-In-One leaves ScaleOut with 1 ContainerRequest(s)
2020-08-16T21:10:51,917  INFO [All-In-One] TaskScheduler: All-In-One Auto-Scaling: in Stable with 9 running ContainerWorker(s)
2020-08-16T21:11:01,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (430080MB / 430080MB)
2020-08-16T21:11:01,917  INFO [All-In-One] TaskScheduler: All-In-One Scale-out: trying to add 1 ContainerWorker(s)
2020-08-16T21:11:11,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (430080MB / 430080MB)
2020-08-16T21:11:21,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (430080MB / 430080MB)
2020-08-16T21:11:31,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (430080MB / 430080MB)
2020-08-16T21:11:41,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (430080MB / 430080MB)
2020-08-16T21:11:46,809  INFO [All-In-One] TaskScheduler: All-In-One Auto-Scaling: in Stable with 11 running ContainerWorker(s)
2020-08-16T21:11:51,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (473088MB / 473088MB)
2020-08-16T21:11:51,917  INFO [All-In-One] TaskScheduler: All-In-One Scale-out: trying to add 1 ContainerWorker(s)
2020-08-16T21:12:01,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (473088MB / 473088MB)
2020-08-16T21:12:11,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (473088MB / 473088MB)
2020-08-16T21:12:21,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (473088MB / 473088MB)
2020-08-16T21:12:31,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (473088MB / 473088MB)
2020-08-16T21:12:41,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (473088MB / 473088MB)
2020-08-16T21:12:51,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (473088MB / 473088MB)
2020-08-16T21:12:51,917  WARN [All-In-One] TaskScheduler: All-In-One leaves ScaleOut with 1 ContainerRequest(s)
2020-08-16T21:12:51,917  INFO [All-In-One] TaskScheduler: All-In-One Auto-Scaling: in Stable with 11 running ContainerWorker(s)
2020-08-16T21:13:01,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (473088MB / 473088MB)
2020-08-16T21:13:01,917  INFO [All-In-One] TaskScheduler: All-In-One Scale-out: trying to add 1 ContainerWorker(s)
2020-08-16T21:13:11,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (473088MB / 473088MB)
2020-08-16T21:13:16,192  INFO [All-In-One] TaskScheduler: All-In-One Auto-Scaling: in Stable with 12 running ContainerWorker(s)
2020-08-16T21:13:21,917  INFO [All-In-One] TaskScheduler: All-In-One current memory usage = 100.0% (516096MB / 516096MB)


We tried increasing thread pool by tuning following property, following https://docs.cloudera.com/documentation/enterprise/5-11-x/topics/admin_hive_on_s3_tuning.html 

But that din't helped, our fs.s3a.* property is as follows:
  • fs.s3a.assumed.role.credentials.provider=org.apache.hadoop.fs.s3a.SimpleAWSCredentialsProvider
  • fs.s3a.assumed.role.session.duration=30m
  • fs.s3a.attempts.maximum=20
  • fs.s3a.aws.credentials.provider=com.amazonaws.auth.InstanceProfileCredentialsProvider
  • fs.s3a.block.size=32M
  • fs.s3a.buffer.dir=${hadoop.tmp.dir}/s3a
  • fs.s3a.committer.magic.enabled=false
  • fs.s3a.committer.name=file
  • fs.s3a.committer.staging.abort.pending.uploads=true
  • fs.s3a.committer.staging.conflict-mode=fail
  • fs.s3a.committer.staging.tmp.path=tmp/staging
  • fs.s3a.committer.staging.unique-filenames=true
  • fs.s3a.committer.threads=8
  • fs.s3a.connection.establish.timeout=5000
  • fs.s3a.connection.maximum=2000
  • fs.s3a.connection.ssl.enabled=false
  • fs.s3a.connection.timeout=200000
  • fs.s3a.etag.checksum.enabled=false
  • fs.s3a.fast.upload.active.blocks=4
  • fs.s3a.fast.upload.buffer=disk
  • fs.s3a.impl=org.apache.hadoop.fs.s3a.S3AFileSystem
  • fs.s3a.list.version=2
  • fs.s3a.max.total.tasks=2000
  • fs.s3a.metadatastore.authoritative=false
  • fs.s3a.metadatastore.impl=org.apache.hadoop.fs.s3a.s3guard.NullMetadataStore
  • fs.s3a.multiobjectdelete.enable=true
  • fs.s3a.multipart.purge=false
  • fs.s3a.multipart.purge.age=86400
  • fs.s3a.multipart.size=100M
  • fs.s3a.multipart.threshold=2147483647
  • fs.s3a.paging.maximum=5000
  • fs.s3a.path.style.access=false
  • fs.s3a.readahead.range=64K
  • fs.s3a.retry.interval=500ms
  • fs.s3a.retry.limit=${fs.s3a.attempts.maximum}
  • fs.s3a.retry.throttle.interval=1000ms
  • fs.s3a.retry.throttle.limit=${fs.s3a.attempts.maximum}
  • fs.s3a.s3guard.cli.prune.age=86400000
  • fs.s3a.s3guard.ddb.background.sleep=25
  • fs.s3a.s3guard.ddb.max.retries=9
  • fs.s3a.s3guard.ddb.table.capacity.read=500
  • fs.s3a.s3guard.ddb.table.capacity.write=100
  • fs.s3a.s3guard.ddb.table.create=false
  • fs.s3a.socket.recv.buffer=8192
  • fs.s3a.socket.send.buffer=8192
  • fs.s3a.threads.core=1024
  • fs.s3a.threads.keepalivetime=60
  • fs.s3a.threads.max=1000

Sungwoo Park

unread,
Aug 16, 2020, 11:36:04 PM8/16/20
to MR3
1.
Does the query eventually fail after rescheduling TaskAttempts, or does it get stuck forever without making progress? If a TaskAttempt fails in a ContainerWorker Pod, DAGAppMaster should reschedule another TaskAttempt from the same Task (specified by mr3.am.task.max.failed.attempts).

I cannot think of a scenario in which the query gets stuck, but if it gets stuck for some reason, could you email me the log of DAGAppMaster?

2.
Could you try a larger value in fs.s3a.connection.maximum (and fs.s3a.threads.max)?

3.
Hive 3 is not quite optimized for S3 operations. For example, this JIRA is only available in Hive 4.


The Docker image for Hive 4 is already available on DockerHub, and if you would like to try Hive 4, please let me know. Note that the Docker image uses Hadoop 3.1.2 and recent versions of Hadoop implement new optimizations for S3. 

FYI, all these optimizations in Hive 4 are all applied to Hive in HDP, whereas we use vanilla Hive 3 with a few select patches applied.

Cheers,

--- Sungwoo

Vikas Rana

unread,
Aug 17, 2020, 12:58:56 PM8/17/20
to Sungwoo Park, MR3
We manage to stabilize the MR3 cluster by tuning the following properties. Previously DAGAppMaster kept adding newer PODs till it hit a higher limit on auto scaling group and worker pods threw an exception on S3 timeout.
Unable to execute HTTP request: Timeout waiting for connection from pool
 And DAGAppMaster try to rerun the failed tasks, but since DEADLOCK takes its own time, DAGAppMaster keeps adding pods. In a few instances jobs succeed but 60-70% of the time it fails.

And after updating the following property, we don't see any exceptions in workers and the query eventually succeeded after running for 4-5hrs.

 <property>

   <name>fs.s3a.connection.maximum</name>

-  <value>250</value>

+  <value>6000</value>

+  <description>Increase the value to increase the maximum number of simultaneous connections to S3. Cloudera recommends setting this value to 1500.</description>

 </property>

 

 <property>

   <name>fs.s3a.threads.core</name>

-  <value>250</value>

-  <description>The value of fs.s3a.threads.max is 256.</description>

+  <value>2048</value>

+  <description>Increase the value to increase the number of core threads in the thread pool used to run any data uploads or copies.</description>

+</property>

+

+<property>

+  <name>fs.s3a.threads.max</name>

+  <value>2000</value>

+  <description>Increase the value to increase the maximum number of concurrent active partition uploads and copies, which each use a thread from the thread pool.</description>

+</property>

+

+<property>

+  <name>fs.s3a.max.total.tasks</name>

+  <value>4000</value>

+  <description>Increase the value to increase the number of partition uploads and copies allowed to the queue before rejecting additional uploads.</description>

+</property>

+

+<property>

+  <name>fs.s3a.blocking.executor.enabled</name>

+  <value>false</value>

+  <description>See HADOOP-13826. https://docs.cloudera.com/documentation/enterprise/5-11-x/topics/admin_hive_on_s3_tuning.html</description>

 </property>


--
You received this message because you are subscribed to a topic in the Google Groups "MR3" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hive-mr3/LkGO2rWYrTc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hive-mr3+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hive-mr3/246cf759-2150-45cd-b5cd-4fef455dbe75n%40googlegroups.com.

Vikas Rana

unread,
Aug 17, 2020, 1:04:51 PM8/17/20
to Sungwoo Park, MR3
@Sungwoo Park We want to profile the MR3 cluster from the JVM heap usages side. I've seen you have updated doc to include Prometheus, https://mr3docs.datamonad.com/docs/mr3/guide/prometheus/
So does it mean I can try enabling prometheus in MR3 1.1 ? or Is this plan to be released in MR3 1.2 only and any tentative ETA around this release.


Thanks in advance.

Cheers,
VR

Vikas Rana

unread,
Aug 17, 2020, 1:28:34 PM8/17/20
to Sungwoo Park, MR3
I've one question regarding deploying ATS in K8s for enabling MR3-UI.  As per the doc we build the ATS from source, any reason why we don't have this image available in dockerhub?
And if I use mr3-all-in-one image does it include RANGER and ATS apart from HIVE?
https://hub.docker.com/r/mr3project/hivemr3-all 

Sungwoo Park

unread,
Aug 17, 2020, 3:15:44 PM8/17/20
to MR3
We manage to stabilize the MR3 cluster by tuning the following properties. Previously DAGAppMaster kept adding newer PODs till it hit a higher limit on auto scaling group and worker pods threw an exception on S3 timeout.
Unable to execute HTTP request: Timeout waiting for connection from pool
 And DAGAppMaster try to rerun the failed tasks, but since DEADLOCK takes its own time, DAGAppMaster keeps adding pods. In a few instances jobs succeed but 60-70% of the time it fails.

And after updating the following property, we don't see any exceptions in workers and the query eventually succeeded after running for 4-5hrs.

Thanks a lot for sharing the story.

The reason that DAGAppMaster keeps adding Pods is that after a TaskAttempt fails, ContainerWorker does not immediately reuse the slot for the failed TaskAttempt. To be specific, if mr3.container.task.failure.num.sleeps is set to a default value of 2, ContainerWorker starts to reuse the slot after 2 minutes. Please see:

mr3.container.task.failure.num.sleeps
mr3.container.task.failure.num.sleeps in mr3-site.xml

This configuration key was introduced to make ContainerWorker more resilient to OutOfMemoryError when the memory size is small. You could set it to 0 if the container is large enough. With mr3.container.task.failure.num.sleeps set to 0, DAGAppMaster will not create more ContainerWorker Pods than necessary even when ContainerWorkers generate errors.

Cheers,

--- Sungwoo

Sungwoo Park

unread,
Aug 17, 2020, 3:20:16 PM8/17/20
to MR3
No, it will be available in MR3 1.2 (tentative ETA around September 19). If you would like to test MR3 with Prometheus right now, I can release MR3-1.2-SNAPSHOT. So, please let me know if you would like to use Prometheus.

Cheers,

--- Sungwoo

Sungwoo Park

unread,
Aug 17, 2020, 3:23:45 PM8/17/20
to MR3
ATS image is not in DockerHub because there has been no request yet. Let me upload the ATS image sometime soon.

All-in-one image includes all of ATS, Ranger, and Hive on MR3. However, it is only for running with a single Docker container, not on Kubernetes. If you would like to see what MR3-UI looks like, or how to use Ranger, this is an easy solution. Please see this quick start guide:


Cheers,

--- Sungwoo 

rana.v...@gmail.com

unread,
Aug 18, 2020, 1:04:19 AM8/18/20
to MR3
Please release MR3-1.2-SNAPSHOT that would be great. We are using 6GB container and wanna check if we can reduce to smaller container size.

Sungwoo Park

unread,
Aug 18, 2020, 8:03:28 AM8/18/20
to MR3
I wonder if your goal is to check the memory usage of individual Containerworker Pods to see if 6GB is enough. Currently only DAGAppMaster exports Prometheus metrics,  and ContainerWorkers do not. So, with the current implementation, we cannot measure the memory usage of individual ContainerWorkers (unless we use JDK tools).

FYI, creating a single large ContainerWorker is better than creating many small ContainerWorkers in general, as long as not too many Tasks (> 20) run concurrently in a single ContainerWorker. For more information, please see 'Performance Tuning' in MR3docs (https://mr3docs.datamonad.com/docs/hadoop/advanced/performance-tuning/):

The performance of Hive on MR3 usually improves if multiple mappers and reducers can run in a ContainerWorker concurrently. Moreover queries are less likely to fail with OutOfMemoryError or MapJoinMemoryExhaustionError because a mapper or reducer can use more memory than specified by hive.mr3.map.task.memory.mb or hive.mr3.reduce.task.memory.mb. With too many mappers and reducers in a ContainerWorker, however, the performance may deteriorate because of the increased overhead of memory allocation and garbage collection.

Cheers,

--- Sungwoo

Vikas Rana

unread,
Aug 18, 2020, 11:37:53 AM8/18/20
to Sungwoo Park, MR3
We are using one single large ContainerWorker to run 7 concurrent mapper/reducers per pod. Our spec is as follows:

Node type: r5d.4xlarge:          8cpu, 64GB
all-in-one-container cpu:         7 core
all-in-one-container memory:  42GB
LLAP enabled
Maper specs:                          6GB, 1 core
Reducer specs:                       6GB,  1 core
hive.mr3.all-in-one.containergroup.memory.mb=42GB,
hive.mr3.container.max.java.heap.fraction=0.8f,
hive.mr3.llap.headroom.mb=0,
hive.llap.io.memory.size=10Gb

We want to check how worker PODs heap usage over its lifetime. We are getting CPU utilization of 90% when the cluster is running at 100% capacity. Based on the memory profile, we may want to switch to M5 or C5 which may provide more compute performance. 



On Tue, Aug 18, 2020 at 5:33 PM Sungwoo Park <gla...@gmail.com> wrote:
I wonder if your goal is to check the memory usage of individual Containerworker Pods to see if 6GB is enough. Currently only DAGAppMaster exports Prometheus metrics,  and ContainerWorkers do not. So, with the current implementation, we cannot measure the memory usage of individual ContainerWorkers (unless we use JDK tools).


Also want to check if in future you are planning to expose JVM metrics from ContainerWorkers as well.
 

Sungwoo Park

unread,
Aug 18, 2020, 12:10:20 PM8/18/20
to MR3
We are using one single large ContainerWorker to run 7 concurrent mapper/reducers per pod. Our spec is as follows:

Node type: r5d.4xlarge:          8cpu, 64GB
all-in-one-container cpu:         7 core
all-in-one-container memory:  42GB
LLAP enabled
Maper specs:                          6GB, 1 core
Reducer specs:                       6GB,  1 core
hive.mr3.all-in-one.containergroup.memory.mb=42GB,
hive.mr3.container.max.java.heap.fraction=0.8f,
hive.mr3.llap.headroom.mb=0,
hive.llap.io.memory.size=10Gb

We want to check how worker PODs heap usage over its lifetime. We are getting CPU utilization of 90% when the cluster is running at 100% capacity. Based on the memory profile, we may want to switch to M5 or C5 which may provide more compute performance. 

Looks to me like a reasonable setting. Here are a few comments (if you use r5d.4xlarge).

1. You allocate 42GB * (1.0 - 0.8) = 8.4GB for page cache. This is okay, but depending on your workload, it might make sense to either 1) further increase the size of page cache by decreasing hive.mr3.container.max.java.heap.fraction (e.g., to 0.7f or even 0.6f), or 2) reduce mapper/reducer size from 6GB to, e.g, 4GB and instead increase the LLAP I/O cache.

This is because 6GB for mapper/reducer might be actually more than enough, especially so because 7 concurrent mappers/reducers share 42GB of memory. Even if you hit OutOfMemoryError, Hive 3 has the mechanism of query re-execution, and you have a very good chance of completing the query in the second attempt. 

For more details on page cache, please see 'Page cache for Docker containers' in Performance Tuning: https://mr3docs.datamonad.com/docs/k8s/advanced/performance-tuning/

2. You can use fractions for the memory size. In this way, you can use some portion of the remaining 1 CPU.



On Tue, Aug 18, 2020 at 5:33 PM Sungwoo Park <gla...@gmail.com> wrote:
I wonder if your goal is to check the memory usage of individual Containerworker Pods to see if 6GB is enough. Currently only DAGAppMaster exports Prometheus metrics,  and ContainerWorkers do not. So, with the current implementation, we cannot measure the memory usage of individual ContainerWorkers (unless we use JDK tools).


Also want to check if in future you are planning to expose JVM metrics from ContainerWorkers as well.

hive3:1.2-snapshot will expose JVM metrics for ContainerWorkers, so you can profile them using Prometheus. Unlike DAGAppMaster, we do not create Services for ContainerWorkers.

Cheers,

--- Sungwoo

Sungwoo Park

unread,
Aug 19, 2020, 9:29:50 AM8/19/20
to MR3
ATS image is not in DockerHub because there has been no request yet. Let me upload the ATS image sometime soon.

I have uploaded mr3project/ats-2.7.7 at DockerHub. 



Cheers,

--- Sungwoo

Sungwoo Park

unread,
Aug 19, 2020, 10:26:22 AM8/19/20
to MR3
Please release MR3-1.2-SNAPSHOT that would be great. We are using 6GB container and wanna check if we can reduce to smaller container size.

 No, worker Pods cannot provision new disks by themselves. They just use local disks already available on the host where they are running. So, a new host added to the K8s cluster should initialize a local disk and mount it. On AWS, this means that:

1. For worker Pods, use an instance type that comes with a locally attached disk, e.g., m5d.xlarge.
2. Configure kops so that when a new node is created, it initialized the locally attached disk and mount it in a local directory, which will be used for hostPaths.

Then, all worker Pods running on the same host share the local directory for storing intermediate data.

Note that you should not run multiple Hive-MR3 clusters in the same K8s cluster. If this is the case, please let me know.

------

I have uploaded hive3:1.2-SNAPSHOT at DockerHub. The documentation has been updated for this release. For the scripts, please use the latest commit in mr3-run-k8s:


In comparison with MR3 1.1, there is no breaking change in MR3, but all Docker containers now run as user 'root', instead of 'hive'. So, you may have to make small changes in your scripts. For details, please see CHANGES.txt below.

Another minor thing is that pinging HiveServer2 does not print stack traces in the log.

Cheers,

--- Sungwoo

From CHANGES.txt:

## MR3
  
Release 1.2: 2020-9-19 (???)
  - DAGAppMaster and ContainerWorkers can publish Prometheus metrics.
  - The default value of mr3.container.task.failure.num.sleeps is 0.
  - Reduce the log size of DAGAppMaster and ContainerWorker.
  - TaskScheduler can process about twice as many events (`TaskSchedulerEventTaskAttemptFinished`) per unit time as in MR3 1.1, thus doubling the maximum cluster size that MR3 can manage.

## Hive on MR3 on Hadoop

Release 1.2: 2020-9-19 (???)
  - Hive expands all system properties in configuration files (such as core-site.xml) before passing to MR3.

## Hive on MR3 on Kubernetes

Release 1.2: 2020-9-19 (???)
  - MR3 creates three ServiceAccounts: 1) for Metastore and HiveSever2 Pods; 2) for DAGAppMaster Pod; 3) for ContainerWorker Pods. The user can use IAM roles for ServiceAccounts.
  - Docker containers start as `root`. In `kubernetes/env.sh`, `DOCKER_USER` should be set to `root` and the service principal name in `HIVE_SERVER2_KERBEROS_PRINCIPAL` should be `root`.

rana.v...@gmail.com

unread,
Aug 24, 2020, 11:42:15 AM8/24/20
to MR3
Hello @Sungwoo,

For enabling Prometheus, I've tried running hive3:1.2-SNAPSHOT in the cluster. We were able to see metrics from DAGAppMaster, but not from ContainerWorkers.
Below is the mr3-site.xml:

<property>
  <name>mr3.prometheus.enable.metrics</name>
  <value>true</value>
</property>

<property>
  <name>mr3.prometheus.enable.jvm.metrics</name>
  <value>true</value>
</property>

<property>
  <name>mr3.k8s.master.pod.additional.labels</name>
  <value>hivemr3_aux=prometheus</value>
</property>

<property>
  <name>mr3.prometheus.worker.enable.metrics</name>
  <value>true</value>
</property>

<property>
  <name>mr3.prometheus.worker.enable.jvm.metrics</name>
  <value>true</value>
</property>

<property>
  <name>mr3.prometheus.worker.httpserver.port</name>
  <value>9890</value>
</property>

Also ContainerWorkers doesn't expose port 9890 [mr3.prometheus.worker.httpserver.port]. Please let know if I'm missing anything here.

Sungwoo Park

unread,
Aug 24, 2020, 12:13:00 PM8/24/20
to MR3
Hello,

Unlike DAGAppMaster, we don't create Service objects for ContainerWorkers (simply because we don't know how many ContainerWorker Pods will be running). Hence, a Service object should be created for each individual ContainerWorker Pod that the user wants to watch.

Here are the steps.

1. Check mr3.prometheus.worker.enable.metrics is set to true.

gitlab-runner@orange1:~/mr3-run/kubernetes/conf$ grep -A1 mr3.prometheus.worker.enable.metrics mr3-site.xml
  <name>mr3.prometheus.worker.enable.metrics</name>
  <value>true</value>

2. Check ContainerWorker Pods are exporting Prometheus metrics. 

In the example below, we install wget in the DAGAppMaster Pod and get the Prometheus metrics from a ContainerWorker Pod whose internal IP address is 10.42.0.1. If everything is okay, you should see all the metrics exported by Prometheus in index.html.

gitlab-runner@orange1:~$ kubectl exec -it -n hivemr3 mr3master-5755-0-tdnx8 /bin/bash; 
root@mr3master-5755-0:/opt/mr3-run/hive# apt-get update; apt-get install -y wget
root@mr3master-5755-0:/opt/mr3-run/hive# wget http://10.42.0.1:9890/
root@mr3master-5755-0:/opt/mr3-run/hive# cat index.html 

3. Create a Service object for a target ContainerWorker Pod.

In the example below, we would like to watch ContainerWorker Pod mr3worker-8512-4. Every ContainerWorker Pod has a label 'mr3-worker-pod-id' whose value is unique during the lifetime of DAGAppMaster. For example, Pod mr3worker-8512-4 has a lable mr3-worker-pod-id=4.

gitlab-runner@orange1:~/mr3-run/kubernetes/conf$ kubectl describe pod -n hivemr3 mr3worker-8512-4 | grep mr3-worker-pod-id
              mr3-worker-pod-id=4

Then, we create a Service for reaching this ContainerWorker Pod. In our example, we create LoadBalancer.

gitlab-runner@orange1:~$ cat prometheus-worker-service.yaml 
apiVersion: v1
kind: Service
metadata:
  namespace: hivemr3
  name: prometheus
spec:
  type: LoadBalancer
  ports:
  - protocol: TCP
    port: 9890
    targetPort: 9890
  selector:
    mr3-worker-pod-id: "4"
  externalIPs:
  - 192.168.10.1

gitlab-runner@orange1:~$ kubectl create -f prometheus-worker-service.yaml 
service/prometheus created

Now all the traffic destined to 192.168.10.1:9890 is rerouted to the target ContainerWorker Pod. Then, you can create an instance of Prometheus for watching the target ContainerWorker Pod.

gitlab-runner@orange1:~$ cat prometheus.yml 
global:
  scrape_interval: 10s

scrape_configs:
  - job_name: prometheus
    static_configs:
      - targets: ["192.168.10.1:9890"]

If this does not work, please let me know.

Cheers,

--- Sungwoo

Sungwoo Park

unread,
Sep 9, 2020, 1:33:09 AM9/9/20
to MR3
I have found that due to a bug in MR3, the resource limit is ignored if autoscaling is enabled. (It works only if autoscaling is disabled.) For the progress on this issue, please see another thread 'worker.total.max.memory' in this Google Group.

Cheers,

--- Sungwoo
Reply all
Reply to author
Forward
0 new messages