[04/20] hadoop git commit: YARN-4696. Improving EntityGroupFSTimelineStore on exception handling, test setup, and concurrency.
YARN-4696. Improving EntityGroupFSTimelineStore on exception handling, test setup, and concurrency. This commit amends commit d49cfb350454c2dfa2f3eb70f79b6d5030ce7bec with a missed test file. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/017d2c12 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/017d2c12 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/017d2c12 Branch: refs/heads/HDFS-1312 Commit: 017d2c127b9cbd75d3e31467172ed832f27ef826 Parents: 9a79b73 Author: Li LuAuthored: Thu Mar 10 13:02:28 2016 -0800 Committer: Li Lu Committed: Thu Mar 10 13:02:28 2016 -0800 -- .../TestOverrideTimelineStoreYarnClient.java| 56 1 file changed, 56 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/017d2c12/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestOverrideTimelineStoreYarnClient.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestOverrideTimelineStoreYarnClient.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestOverrideTimelineStoreYarnClient.java new file mode 100644 index 000..c190266 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestOverrideTimelineStoreYarnClient.java @@ -0,0 +1,56 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.yarn.server.timeline; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.yarn.api.records.ApplicationId; +import org.apache.hadoop.yarn.client.api.YarnClient; +import org.apache.hadoop.yarn.conf.YarnConfiguration; +import org.junit.Assert; +import org.junit.Test; + +import java.io.IOException; + +public class TestOverrideTimelineStoreYarnClient { + + @Test + public void testLifecycleAndOverride() throws Throwable { +YarnConfiguration conf = new YarnConfiguration(); +try(NoRMStore store = new NoRMStore()) { + store.init(conf); + store.start(); + Assert.assertEquals(EntityGroupFSTimelineStore.AppState.ACTIVE, + store.getAppState(ApplicationId.newInstance(1, 1))); + store.stop(); +} + } + + private static class NoRMStore extends EntityGroupFSTimelineStore { +@Override +protected YarnClient createAndInitYarnClient(Configuration conf) { + return null; +} + +@Override +protected AppState getAppState(ApplicationId appId) +throws IOException { + return AppState.ACTIVE; +} + } +}
[02/20] hadoop git commit: YARN-4696. Improving EntityGroupFSTimelineStore on exception handling, test setup, and concurrency. (Steve Loughran via gtcarrera9)
YARN-4696. Improving EntityGroupFSTimelineStore on exception handling, test setup, and concurrency. (Steve Loughran via gtcarrera9) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/d49cfb35 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/d49cfb35 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/d49cfb35 Branch: refs/heads/HDFS-1312 Commit: d49cfb350454c2dfa2f3eb70f79b6d5030ce7bec Parents: 318c9b6 Author: Li LuAuthored: Thu Mar 10 10:51:55 2016 -0800 Committer: Li Lu Committed: Thu Mar 10 10:51:55 2016 -0800 -- .../hadoop/yarn/conf/YarnConfiguration.java | 6 + .../hadoop/yarn/client/api/TimelineClient.java | 4 +- .../api/impl/FileSystemTimelineWriter.java | 51 ++--- .../client/api/impl/TimelineClientImpl.java | 13 ++ .../yarn/client/api/impl/TimelineWriter.java| 40 +++- .../timeline/webapp/TimelineWebServices.java| 12 +- .../yarn/server/timeline/EntityCacheItem.java | 40 ++-- .../timeline/EntityGroupFSTimelineStore.java| 204 ++- .../hadoop/yarn/server/timeline/LogInfo.java| 11 +- .../TestEntityGroupFSTimelineStore.java | 8 +- 10 files changed, 279 insertions(+), 110 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/d49cfb35/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java index 61d1d72..ff4b493 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java @@ -1747,6 +1747,12 @@ public class YarnConfiguration extends Configuration { public static final long TIMELINE_SERVICE_CLIENT_INTERNAL_TIMERS_TTL_SECS_DEFAULT = 7 * 60; + // This is temporary solution. The configuration will be deleted once we have + // the FileSystem API to check whether append operation is supported or not. + public static final String TIMELINE_SERVICE_ENTITYFILE_FS_SUPPORT_APPEND + = TIMELINE_SERVICE_PREFIX + + "entity-file.fs-support-append"; + // mark app-history related configs @Private as application history is going // to be integrated into the timeline service @Private http://git-wip-us.apache.org/repos/asf/hadoop/blob/d49cfb35/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineClient.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineClient.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineClient.java index 258b9f5..09298b5 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineClient.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineClient.java @@ -18,6 +18,7 @@ package org.apache.hadoop.yarn.client.api; +import java.io.Flushable; import java.io.IOException; import org.apache.hadoop.classification.InterfaceAudience.Private; @@ -41,7 +42,8 @@ import org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier; */ @Public @Evolving -public abstract class TimelineClient extends AbstractService { +public abstract class TimelineClient extends AbstractService implements +Flushable { /** * Create a timeline client. The current UGI when the user initialize the http://git-wip-us.apache.org/repos/asf/hadoop/blob/d49cfb35/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java index aa1f1f8..9e719b7 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java +++
[19/50] [abbrv] hadoop git commit: YARN-4696. Improving EntityGroupFSTimelineStore on exception handling, test setup, and concurrency. (Steve Loughran via gtcarrera9)
YARN-4696. Improving EntityGroupFSTimelineStore on exception handling, test setup, and concurrency. (Steve Loughran via gtcarrera9) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/d49cfb35 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/d49cfb35 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/d49cfb35 Branch: refs/heads/HDFS-7240 Commit: d49cfb350454c2dfa2f3eb70f79b6d5030ce7bec Parents: 318c9b6 Author: Li LuAuthored: Thu Mar 10 10:51:55 2016 -0800 Committer: Li Lu Committed: Thu Mar 10 10:51:55 2016 -0800 -- .../hadoop/yarn/conf/YarnConfiguration.java | 6 + .../hadoop/yarn/client/api/TimelineClient.java | 4 +- .../api/impl/FileSystemTimelineWriter.java | 51 ++--- .../client/api/impl/TimelineClientImpl.java | 13 ++ .../yarn/client/api/impl/TimelineWriter.java| 40 +++- .../timeline/webapp/TimelineWebServices.java| 12 +- .../yarn/server/timeline/EntityCacheItem.java | 40 ++-- .../timeline/EntityGroupFSTimelineStore.java| 204 ++- .../hadoop/yarn/server/timeline/LogInfo.java| 11 +- .../TestEntityGroupFSTimelineStore.java | 8 +- 10 files changed, 279 insertions(+), 110 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/d49cfb35/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java index 61d1d72..ff4b493 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java @@ -1747,6 +1747,12 @@ public class YarnConfiguration extends Configuration { public static final long TIMELINE_SERVICE_CLIENT_INTERNAL_TIMERS_TTL_SECS_DEFAULT = 7 * 60; + // This is temporary solution. The configuration will be deleted once we have + // the FileSystem API to check whether append operation is supported or not. + public static final String TIMELINE_SERVICE_ENTITYFILE_FS_SUPPORT_APPEND + = TIMELINE_SERVICE_PREFIX + + "entity-file.fs-support-append"; + // mark app-history related configs @Private as application history is going // to be integrated into the timeline service @Private http://git-wip-us.apache.org/repos/asf/hadoop/blob/d49cfb35/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineClient.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineClient.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineClient.java index 258b9f5..09298b5 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineClient.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineClient.java @@ -18,6 +18,7 @@ package org.apache.hadoop.yarn.client.api; +import java.io.Flushable; import java.io.IOException; import org.apache.hadoop.classification.InterfaceAudience.Private; @@ -41,7 +42,8 @@ import org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier; */ @Public @Evolving -public abstract class TimelineClient extends AbstractService { +public abstract class TimelineClient extends AbstractService implements +Flushable { /** * Create a timeline client. The current UGI when the user initialize the http://git-wip-us.apache.org/repos/asf/hadoop/blob/d49cfb35/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java index aa1f1f8..9e719b7 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java +++
[21/50] [abbrv] hadoop git commit: YARN-4696. Improving EntityGroupFSTimelineStore on exception handling, test setup, and concurrency.
YARN-4696. Improving EntityGroupFSTimelineStore on exception handling, test setup, and concurrency. This commit amends commit d49cfb350454c2dfa2f3eb70f79b6d5030ce7bec with a missed test file. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/017d2c12 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/017d2c12 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/017d2c12 Branch: refs/heads/HDFS-7240 Commit: 017d2c127b9cbd75d3e31467172ed832f27ef826 Parents: 9a79b73 Author: Li LuAuthored: Thu Mar 10 13:02:28 2016 -0800 Committer: Li Lu Committed: Thu Mar 10 13:02:28 2016 -0800 -- .../TestOverrideTimelineStoreYarnClient.java| 56 1 file changed, 56 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/017d2c12/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestOverrideTimelineStoreYarnClient.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestOverrideTimelineStoreYarnClient.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestOverrideTimelineStoreYarnClient.java new file mode 100644 index 000..c190266 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestOverrideTimelineStoreYarnClient.java @@ -0,0 +1,56 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.yarn.server.timeline; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.yarn.api.records.ApplicationId; +import org.apache.hadoop.yarn.client.api.YarnClient; +import org.apache.hadoop.yarn.conf.YarnConfiguration; +import org.junit.Assert; +import org.junit.Test; + +import java.io.IOException; + +public class TestOverrideTimelineStoreYarnClient { + + @Test + public void testLifecycleAndOverride() throws Throwable { +YarnConfiguration conf = new YarnConfiguration(); +try(NoRMStore store = new NoRMStore()) { + store.init(conf); + store.start(); + Assert.assertEquals(EntityGroupFSTimelineStore.AppState.ACTIVE, + store.getAppState(ApplicationId.newInstance(1, 1))); + store.stop(); +} + } + + private static class NoRMStore extends EntityGroupFSTimelineStore { +@Override +protected YarnClient createAndInitYarnClient(Configuration conf) { + return null; +} + +@Override +protected AppState getAppState(ApplicationId appId) +throws IOException { + return AppState.ACTIVE; +} + } +}
hadoop git commit: YARN-4696. Improving EntityGroupFSTimelineStore on exception handling, test setup, and concurrency.
Repository: hadoop Updated Branches: refs/heads/branch-2.8 8e89bb9d3 -> 92e86ff0c YARN-4696. Improving EntityGroupFSTimelineStore on exception handling, test setup, and concurrency. This commit amends commit d49cfb350454c2dfa2f3eb70f79b6d5030ce7bec with a missed test file. (cherry picked from commit 017d2c127b9cbd75d3e31467172ed832f27ef826) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/92e86ff0 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/92e86ff0 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/92e86ff0 Branch: refs/heads/branch-2.8 Commit: 92e86ff0cb2c8438553a318b6534fee5b9e634aa Parents: 8e89bb9 Author: Li LuAuthored: Thu Mar 10 13:02:28 2016 -0800 Committer: Li Lu Committed: Thu Mar 10 13:06:02 2016 -0800 -- .../TestOverrideTimelineStoreYarnClient.java| 56 1 file changed, 56 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/92e86ff0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestOverrideTimelineStoreYarnClient.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestOverrideTimelineStoreYarnClient.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestOverrideTimelineStoreYarnClient.java new file mode 100644 index 000..c190266 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestOverrideTimelineStoreYarnClient.java @@ -0,0 +1,56 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.yarn.server.timeline; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.yarn.api.records.ApplicationId; +import org.apache.hadoop.yarn.client.api.YarnClient; +import org.apache.hadoop.yarn.conf.YarnConfiguration; +import org.junit.Assert; +import org.junit.Test; + +import java.io.IOException; + +public class TestOverrideTimelineStoreYarnClient { + + @Test + public void testLifecycleAndOverride() throws Throwable { +YarnConfiguration conf = new YarnConfiguration(); +try(NoRMStore store = new NoRMStore()) { + store.init(conf); + store.start(); + Assert.assertEquals(EntityGroupFSTimelineStore.AppState.ACTIVE, + store.getAppState(ApplicationId.newInstance(1, 1))); + store.stop(); +} + } + + private static class NoRMStore extends EntityGroupFSTimelineStore { +@Override +protected YarnClient createAndInitYarnClient(Configuration conf) { + return null; +} + +@Override +protected AppState getAppState(ApplicationId appId) +throws IOException { + return AppState.ACTIVE; +} + } +}
hadoop git commit: YARN-4696. Improving EntityGroupFSTimelineStore on exception handling, test setup, and concurrency.
Repository: hadoop Updated Branches: refs/heads/branch-2 92125e605 -> 2b16a54fb YARN-4696. Improving EntityGroupFSTimelineStore on exception handling, test setup, and concurrency. This commit amends commit d49cfb350454c2dfa2f3eb70f79b6d5030ce7bec with a missed test file. (cherry picked from commit 017d2c127b9cbd75d3e31467172ed832f27ef826) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/2b16a54f Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/2b16a54f Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/2b16a54f Branch: refs/heads/branch-2 Commit: 2b16a54fbef2893245f392ee058f10c2845f1dc1 Parents: 92125e6 Author: Li LuAuthored: Thu Mar 10 13:02:28 2016 -0800 Committer: Li Lu Committed: Thu Mar 10 13:04:57 2016 -0800 -- .../TestOverrideTimelineStoreYarnClient.java| 56 1 file changed, 56 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/2b16a54f/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestOverrideTimelineStoreYarnClient.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestOverrideTimelineStoreYarnClient.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestOverrideTimelineStoreYarnClient.java new file mode 100644 index 000..c190266 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestOverrideTimelineStoreYarnClient.java @@ -0,0 +1,56 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.yarn.server.timeline; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.yarn.api.records.ApplicationId; +import org.apache.hadoop.yarn.client.api.YarnClient; +import org.apache.hadoop.yarn.conf.YarnConfiguration; +import org.junit.Assert; +import org.junit.Test; + +import java.io.IOException; + +public class TestOverrideTimelineStoreYarnClient { + + @Test + public void testLifecycleAndOverride() throws Throwable { +YarnConfiguration conf = new YarnConfiguration(); +try(NoRMStore store = new NoRMStore()) { + store.init(conf); + store.start(); + Assert.assertEquals(EntityGroupFSTimelineStore.AppState.ACTIVE, + store.getAppState(ApplicationId.newInstance(1, 1))); + store.stop(); +} + } + + private static class NoRMStore extends EntityGroupFSTimelineStore { +@Override +protected YarnClient createAndInitYarnClient(Configuration conf) { + return null; +} + +@Override +protected AppState getAppState(ApplicationId appId) +throws IOException { + return AppState.ACTIVE; +} + } +}
hadoop git commit: YARN-4696. Improving EntityGroupFSTimelineStore on exception handling, test setup, and concurrency.
Repository: hadoop Updated Branches: refs/heads/trunk 9a79b738c -> 017d2c127 YARN-4696. Improving EntityGroupFSTimelineStore on exception handling, test setup, and concurrency. This commit amends commit d49cfb350454c2dfa2f3eb70f79b6d5030ce7bec with a missed test file. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/017d2c12 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/017d2c12 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/017d2c12 Branch: refs/heads/trunk Commit: 017d2c127b9cbd75d3e31467172ed832f27ef826 Parents: 9a79b73 Author: Li LuAuthored: Thu Mar 10 13:02:28 2016 -0800 Committer: Li Lu Committed: Thu Mar 10 13:02:28 2016 -0800 -- .../TestOverrideTimelineStoreYarnClient.java| 56 1 file changed, 56 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/017d2c12/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestOverrideTimelineStoreYarnClient.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestOverrideTimelineStoreYarnClient.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestOverrideTimelineStoreYarnClient.java new file mode 100644 index 000..c190266 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestOverrideTimelineStoreYarnClient.java @@ -0,0 +1,56 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.yarn.server.timeline; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.yarn.api.records.ApplicationId; +import org.apache.hadoop.yarn.client.api.YarnClient; +import org.apache.hadoop.yarn.conf.YarnConfiguration; +import org.junit.Assert; +import org.junit.Test; + +import java.io.IOException; + +public class TestOverrideTimelineStoreYarnClient { + + @Test + public void testLifecycleAndOverride() throws Throwable { +YarnConfiguration conf = new YarnConfiguration(); +try(NoRMStore store = new NoRMStore()) { + store.init(conf); + store.start(); + Assert.assertEquals(EntityGroupFSTimelineStore.AppState.ACTIVE, + store.getAppState(ApplicationId.newInstance(1, 1))); + store.stop(); +} + } + + private static class NoRMStore extends EntityGroupFSTimelineStore { +@Override +protected YarnClient createAndInitYarnClient(Configuration conf) { + return null; +} + +@Override +protected AppState getAppState(ApplicationId appId) +throws IOException { + return AppState.ACTIVE; +} + } +}
hadoop git commit: YARN-4696. Improving EntityGroupFSTimelineStore on exception handling, test setup, and concurrency. (Steve Loughran via gtcarrera9)
Repository: hadoop Updated Branches: refs/heads/branch-2.8 a7164e90b -> 8e89bb9d3 YARN-4696. Improving EntityGroupFSTimelineStore on exception handling, test setup, and concurrency. (Steve Loughran via gtcarrera9) (cherry-picked from commit d49cfb350454c2dfa2f3eb70f79b6d5030ce7bec) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/8e89bb9d Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/8e89bb9d Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/8e89bb9d Branch: refs/heads/branch-2.8 Commit: 8e89bb9d380f25ca18bf0bed5e86a3e139977e36 Parents: a7164e9 Author: Li LuAuthored: Thu Mar 10 10:51:55 2016 -0800 Committer: Li Lu Committed: Thu Mar 10 10:58:51 2016 -0800 -- .../hadoop/yarn/conf/YarnConfiguration.java | 6 + .../hadoop/yarn/client/api/TimelineClient.java | 4 +- .../api/impl/FileSystemTimelineWriter.java | 51 ++--- .../client/api/impl/TimelineClientImpl.java | 13 ++ .../yarn/client/api/impl/TimelineWriter.java| 40 +++- .../timeline/webapp/TimelineWebServices.java| 12 +- .../yarn/server/timeline/EntityCacheItem.java | 40 ++-- .../timeline/EntityGroupFSTimelineStore.java| 204 ++- .../hadoop/yarn/server/timeline/LogInfo.java| 11 +- .../TestEntityGroupFSTimelineStore.java | 8 +- 10 files changed, 279 insertions(+), 110 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/8e89bb9d/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java index 52aa953..5e1c6fa 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java @@ -1679,6 +1679,12 @@ public class YarnConfiguration extends Configuration { public static final long TIMELINE_SERVICE_CLIENT_INTERNAL_TIMERS_TTL_SECS_DEFAULT = 7 * 60; + // This is temporary solution. The configuration will be deleted once we have + // the FileSystem API to check whether append operation is supported or not. + public static final String TIMELINE_SERVICE_ENTITYFILE_FS_SUPPORT_APPEND + = TIMELINE_SERVICE_PREFIX + + "entity-file.fs-support-append"; + // mark app-history related configs @Private as application history is going // to be integrated into the timeline service @Private http://git-wip-us.apache.org/repos/asf/hadoop/blob/8e89bb9d/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineClient.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineClient.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineClient.java index 258b9f5..09298b5 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineClient.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineClient.java @@ -18,6 +18,7 @@ package org.apache.hadoop.yarn.client.api; +import java.io.Flushable; import java.io.IOException; import org.apache.hadoop.classification.InterfaceAudience.Private; @@ -41,7 +42,8 @@ import org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier; */ @Public @Evolving -public abstract class TimelineClient extends AbstractService { +public abstract class TimelineClient extends AbstractService implements +Flushable { /** * Create a timeline client. The current UGI when the user initialize the http://git-wip-us.apache.org/repos/asf/hadoop/blob/8e89bb9d/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java index aa1f1f8..9e719b7 100644 ---
hadoop git commit: YARN-4696. Improving EntityGroupFSTimelineStore on exception handling, test setup, and concurrency. (Steve Loughran via gtcarrera9)
Repository: hadoop Updated Branches: refs/heads/branch-2 2e32aa547 -> 76ef097fd YARN-4696. Improving EntityGroupFSTimelineStore on exception handling, test setup, and concurrency. (Steve Loughran via gtcarrera9) (cherry-picked from commit d49cfb350454c2dfa2f3eb70f79b6d5030ce7bec) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/76ef097f Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/76ef097f Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/76ef097f Branch: refs/heads/branch-2 Commit: 76ef097fd10af7bf4b876bcfec775f8049ac2034 Parents: 2e32aa5 Author: Li LuAuthored: Thu Mar 10 10:51:55 2016 -0800 Committer: Li Lu Committed: Thu Mar 10 10:56:51 2016 -0800 -- .../hadoop/yarn/conf/YarnConfiguration.java | 6 + .../hadoop/yarn/client/api/TimelineClient.java | 4 +- .../api/impl/FileSystemTimelineWriter.java | 51 ++--- .../client/api/impl/TimelineClientImpl.java | 13 ++ .../yarn/client/api/impl/TimelineWriter.java| 40 +++- .../timeline/webapp/TimelineWebServices.java| 12 +- .../yarn/server/timeline/EntityCacheItem.java | 40 ++-- .../timeline/EntityGroupFSTimelineStore.java| 204 ++- .../hadoop/yarn/server/timeline/LogInfo.java| 11 +- .../TestEntityGroupFSTimelineStore.java | 8 +- 10 files changed, 279 insertions(+), 110 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/76ef097f/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java index 4573404..174d0c4 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java @@ -1747,6 +1747,12 @@ public class YarnConfiguration extends Configuration { public static final long TIMELINE_SERVICE_CLIENT_INTERNAL_TIMERS_TTL_SECS_DEFAULT = 7 * 60; + // This is temporary solution. The configuration will be deleted once we have + // the FileSystem API to check whether append operation is supported or not. + public static final String TIMELINE_SERVICE_ENTITYFILE_FS_SUPPORT_APPEND + = TIMELINE_SERVICE_PREFIX + + "entity-file.fs-support-append"; + // mark app-history related configs @Private as application history is going // to be integrated into the timeline service @Private http://git-wip-us.apache.org/repos/asf/hadoop/blob/76ef097f/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineClient.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineClient.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineClient.java index 258b9f5..09298b5 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineClient.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineClient.java @@ -18,6 +18,7 @@ package org.apache.hadoop.yarn.client.api; +import java.io.Flushable; import java.io.IOException; import org.apache.hadoop.classification.InterfaceAudience.Private; @@ -41,7 +42,8 @@ import org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier; */ @Public @Evolving -public abstract class TimelineClient extends AbstractService { +public abstract class TimelineClient extends AbstractService implements +Flushable { /** * Create a timeline client. The current UGI when the user initialize the http://git-wip-us.apache.org/repos/asf/hadoop/blob/76ef097f/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java index aa1f1f8..9e719b7 100644 ---
hadoop git commit: YARN-4696. Improving EntityGroupFSTimelineStore on exception handling, test setup, and concurrency. (Steve Loughran via gtcarrera9)
Repository: hadoop Updated Branches: refs/heads/trunk 318c9b68b -> d49cfb350 YARN-4696. Improving EntityGroupFSTimelineStore on exception handling, test setup, and concurrency. (Steve Loughran via gtcarrera9) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/d49cfb35 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/d49cfb35 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/d49cfb35 Branch: refs/heads/trunk Commit: d49cfb350454c2dfa2f3eb70f79b6d5030ce7bec Parents: 318c9b6 Author: Li LuAuthored: Thu Mar 10 10:51:55 2016 -0800 Committer: Li Lu Committed: Thu Mar 10 10:51:55 2016 -0800 -- .../hadoop/yarn/conf/YarnConfiguration.java | 6 + .../hadoop/yarn/client/api/TimelineClient.java | 4 +- .../api/impl/FileSystemTimelineWriter.java | 51 ++--- .../client/api/impl/TimelineClientImpl.java | 13 ++ .../yarn/client/api/impl/TimelineWriter.java| 40 +++- .../timeline/webapp/TimelineWebServices.java| 12 +- .../yarn/server/timeline/EntityCacheItem.java | 40 ++-- .../timeline/EntityGroupFSTimelineStore.java| 204 ++- .../hadoop/yarn/server/timeline/LogInfo.java| 11 +- .../TestEntityGroupFSTimelineStore.java | 8 +- 10 files changed, 279 insertions(+), 110 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/d49cfb35/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java index 61d1d72..ff4b493 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java @@ -1747,6 +1747,12 @@ public class YarnConfiguration extends Configuration { public static final long TIMELINE_SERVICE_CLIENT_INTERNAL_TIMERS_TTL_SECS_DEFAULT = 7 * 60; + // This is temporary solution. The configuration will be deleted once we have + // the FileSystem API to check whether append operation is supported or not. + public static final String TIMELINE_SERVICE_ENTITYFILE_FS_SUPPORT_APPEND + = TIMELINE_SERVICE_PREFIX + + "entity-file.fs-support-append"; + // mark app-history related configs @Private as application history is going // to be integrated into the timeline service @Private http://git-wip-us.apache.org/repos/asf/hadoop/blob/d49cfb35/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineClient.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineClient.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineClient.java index 258b9f5..09298b5 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineClient.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineClient.java @@ -18,6 +18,7 @@ package org.apache.hadoop.yarn.client.api; +import java.io.Flushable; import java.io.IOException; import org.apache.hadoop.classification.InterfaceAudience.Private; @@ -41,7 +42,8 @@ import org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier; */ @Public @Evolving -public abstract class TimelineClient extends AbstractService { +public abstract class TimelineClient extends AbstractService implements +Flushable { /** * Create a timeline client. The current UGI when the user initialize the http://git-wip-us.apache.org/repos/asf/hadoop/blob/d49cfb35/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java index aa1f1f8..9e719b7 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java