- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.apache.hadoop.yarn.conf.YarnConfiguration.setInt()
方法的一些代码示例,展示了YarnConfiguration.setInt()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YarnConfiguration.setInt()
方法的具体详情如下:
包路径:org.apache.hadoop.yarn.conf.YarnConfiguration
类名称:YarnConfiguration
方法名:setInt
暂无
代码示例来源:origin: apache/flink
@BeforeClass
public static void setup() {
YARN_CONFIGURATION.setClass(YarnConfiguration.RM_SCHEDULER, FifoScheduler.class, ResourceScheduler.class);
YARN_CONFIGURATION.setInt(YarnConfiguration.NM_PMEM_MB, 768);
YARN_CONFIGURATION.setInt(YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_MB, 512);
YARN_CONFIGURATION.set(YarnTestBase.TEST_CLUSTER_NAME_KEY, "flink-yarn-tests-fifo");
startYARNWithConfig(YARN_CONFIGURATION);
}
代码示例来源:origin: apache/flink
@BeforeClass
public static void setup() throws Exception {
YARN_CONFIGURATION.setClass(YarnConfiguration.RM_SCHEDULER, CapacityScheduler.class, ResourceScheduler.class);
YARN_CONFIGURATION.set("yarn.scheduler.capacity.root.queues", "default,qa-team");
YARN_CONFIGURATION.setInt("yarn.scheduler.capacity.root.default.capacity", 40);
YARN_CONFIGURATION.setInt("yarn.scheduler.capacity.root.qa-team.capacity", 60);
YARN_CONFIGURATION.set(YarnTestBase.TEST_CLUSTER_NAME_KEY, "flink-yarn-tests-capacityscheduler");
startYARNWithConfig(YARN_CONFIGURATION);
restClientExecutor = Executors.newSingleThreadExecutor();
restClient = new RestClient(RestClientConfiguration.fromConfiguration(new Configuration()), restClientExecutor);
}
代码示例来源:origin: apache/flink
@BeforeClass
public static void setup() throws Exception {
zkServer = new TestingServer();
storageDir = FOLDER.newFolder().getAbsolutePath();
// startYARNWithConfig should be implemented by subclass
YARN_CONFIGURATION.setClass(YarnConfiguration.RM_SCHEDULER, CapacityScheduler.class, ResourceScheduler.class);
YARN_CONFIGURATION.set(YarnTestBase.TEST_CLUSTER_NAME_KEY, LOG_DIR);
YARN_CONFIGURATION.setInt(YarnConfiguration.NM_PMEM_MB, 4096);
startYARNWithConfig(YARN_CONFIGURATION);
}
代码示例来源:origin: apache/flink
YARN_CONFIGURATION.setInt(YarnConfiguration.NM_PMEM_MB, 768);
YARN_CONFIGURATION.setInt(YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_MB, 512);
YARN_CONFIGURATION.set(YarnTestBase.TEST_CLUSTER_NAME_KEY, "flink-yarn-tests-fifo-secured");
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-registry
public YarnConfiguration createRegistryConfiguration() {
YarnConfiguration conf = new YarnConfiguration();
conf.setInt(RegistryConstants.KEY_REGISTRY_ZK_CONNECTION_TIMEOUT, 1000);
conf.setInt(RegistryConstants.KEY_REGISTRY_ZK_RETRY_INTERVAL, 500);
conf.setInt(RegistryConstants.KEY_REGISTRY_ZK_RETRY_TIMES, 10);
conf.setInt(RegistryConstants.KEY_REGISTRY_ZK_RETRY_CEILING, 10);
conf.set(RegistryConstants.KEY_REGISTRY_ZK_QUORUM,
zookeeper.getConnectionString());
return conf;
}
}
代码示例来源:origin: io.hops/hadoop-yarn-registry
public YarnConfiguration createRegistryConfiguration() {
YarnConfiguration conf = new YarnConfiguration();
conf.setInt(RegistryConstants.KEY_REGISTRY_ZK_CONNECTION_TIMEOUT, 1000);
conf.setInt(RegistryConstants.KEY_REGISTRY_ZK_RETRY_INTERVAL, 500);
conf.setInt(RegistryConstants.KEY_REGISTRY_ZK_RETRY_TIMES, 10);
conf.setInt(RegistryConstants.KEY_REGISTRY_ZK_RETRY_CEILING, 10);
conf.set(RegistryConstants.KEY_REGISTRY_ZK_QUORUM,
zookeeper.getConnectionString());
return conf;
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
private static Configuration createConfForDelegationTokenNodeSplit(
int splitIndex) {
YarnConfiguration conf = new YarnConfiguration();
conf.setInt(YarnConfiguration.ZK_DELEGATION_TOKEN_NODE_SPLIT_INDEX,
splitIndex);
return conf;
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
private static Configuration createConfForAppNodeSplit(int splitIndex) {
YarnConfiguration conf = new YarnConfiguration();
conf.setInt(YarnConfiguration.ZK_APPID_NODE_SPLIT_INDEX, splitIndex);
return conf;
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
@Test(timeout = 60000)
public void testNonDefaultMinimumAllocation() throws Exception {
// Set custom min-alloc to test tweaking it
int allocMB = 1536;
YarnConfiguration conf = new YarnConfiguration(TestFifoScheduler.conf);
conf.setInt(YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_MB, allocMB);
conf.setInt(YarnConfiguration.RM_SCHEDULER_MAXIMUM_ALLOCATION_MB,
allocMB * 10);
// Test for something lesser than this.
testMinimumAllocation(conf, allocMB / 2);
}
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager
@Test
public void testNonDefaultMinimumAllocation() throws Exception {
// Set custom min-alloc to test tweaking it
int allocMB = 1536;
YarnConfiguration conf = new YarnConfiguration(TestFifoScheduler.conf);
conf.setInt(YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_MB, allocMB);
conf.setInt(YarnConfiguration.RM_SCHEDULER_MAXIMUM_ALLOCATION_MB,
allocMB * 10);
// Test for something lesser than this.
testMinimumAllocation(conf, allocMB / 2);
}
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager
@Test
public void testZKAuths() throws Exception {
TestZKClient zkClientTester = new TestZKClient();
YarnConfiguration conf = new YarnConfiguration();
conf.setInt(YarnConfiguration.RM_ZK_NUM_RETRIES, 1);
conf.setInt(YarnConfiguration.RM_ZK_TIMEOUT_MS, ZK_TIMEOUT_MS);
conf.set(YarnConfiguration.RM_ZK_ACL, TEST_ACL);
conf.set(YarnConfiguration.RM_ZK_AUTH, TEST_AUTH_GOOD);
zkClientTester.getRMStateStore(conf);
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
@Before
public void setup() throws UnknownHostException {
Logger rootLogger = LogManager.getRootLogger();
rootLogger.setLevel(Level.DEBUG);
conf = new YarnConfiguration();
UserGroupInformation.setConfiguration(conf);
conf.setInt(YarnConfiguration.RM_AM_MAX_ATTEMPTS,
YarnConfiguration.DEFAULT_RM_AM_MAX_ATTEMPTS);
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
@Test
public void testZKAuths() throws Exception {
TestZKClient zkClientTester = new TestZKClient();
YarnConfiguration conf = new YarnConfiguration();
conf.setInt(CommonConfigurationKeys.ZK_NUM_RETRIES, 1);
conf.setInt(CommonConfigurationKeys.ZK_TIMEOUT_MS, ZK_TIMEOUT_MS);
conf.set(CommonConfigurationKeys.ZK_ACL, TEST_ACL);
conf.set(CommonConfigurationKeys.ZK_AUTH, TEST_AUTH_GOOD);
zkClientTester.getRMStateStore(conf);
}
}
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager
@Before
public void setup() throws UnknownHostException {
Logger rootLogger = LogManager.getRootLogger();
rootLogger.setLevel(Level.DEBUG);
conf = new YarnConfiguration();
UserGroupInformation.setConfiguration(conf);
conf.setInt(YarnConfiguration.RM_AM_MAX_ATTEMPTS,
YarnConfiguration.DEFAULT_RM_AM_MAX_ATTEMPTS);
}
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-common
@Test(timeout=10000)
public void testDispatchStopOnTimeout() throws Exception {
BlockingQueue<Event> eventQueue = new LinkedBlockingQueue<Event>();
eventQueue = spy(eventQueue);
// simulate dispatcher is not drained.
when(eventQueue.isEmpty()).thenReturn(false);
YarnConfiguration conf = new YarnConfiguration();
conf.setInt(YarnConfiguration.DISPATCHER_DRAIN_EVENTS_TIMEOUT, 2000);
DrainDispatcher disp = new DrainDispatcher(eventQueue);
disp.init(conf);
disp.setDrainEventsOnStop();
disp.start();
disp.waitForEventThreadToWait();
disp.close();
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common
@Test(timeout=10000)
public void testDispatchStopOnTimeout() throws Exception {
BlockingQueue<Event> eventQueue = new LinkedBlockingQueue<Event>();
eventQueue = spy(eventQueue);
// simulate dispatcher is not drained.
when(eventQueue.isEmpty()).thenReturn(false);
YarnConfiguration conf = new YarnConfiguration();
conf.setInt(YarnConfiguration.DISPATCHER_DRAIN_EVENTS_TIMEOUT, 2000);
DrainDispatcher disp = new DrainDispatcher(eventQueue);
disp.init(conf);
disp.setDrainEventsOnStop();
disp.start();
disp.waitForEventThreadToWait();
disp.close();
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common
@Before
public void setup() {
conf = new YarnConfiguration();
conf.setBoolean(YarnConfiguration.TIMELINE_SERVICE_ENABLED, true);
conf.setFloat(YarnConfiguration.TIMELINE_SERVICE_VERSION, 2.0f);
conf.setInt(YarnConfiguration.NUMBER_OF_ASYNC_ENTITIES_TO_MERGE, 3);
if (!currTestName.getMethodName()
.contains("testRetryOnConnectionFailure")) {
client = createTimelineClient(conf);
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
@Before
public void createAndStartRM() {
CapacitySchedulerConfiguration csConf =
new CapacitySchedulerConfiguration();
YarnConfiguration conf = new YarnConfiguration(csConf);
conf.setClass(YarnConfiguration.RM_SCHEDULER, CapacityScheduler.class,
ResourceScheduler.class);
conf.setBoolean(
YarnConfiguration.OPPORTUNISTIC_CONTAINER_ALLOCATION_ENABLED, true);
conf.setInt(
YarnConfiguration.NM_CONTAINER_QUEUING_SORTING_NODES_INTERVAL_MS, 100);
startRM(conf);
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
public void createAndStartRMWithAutoUpdateContainer() {
CapacitySchedulerConfiguration csConf =
new CapacitySchedulerConfiguration();
YarnConfiguration conf = new YarnConfiguration(csConf);
conf.setBoolean(YarnConfiguration.RM_AUTO_UPDATE_CONTAINERS, true);
conf.setClass(YarnConfiguration.RM_SCHEDULER, CapacityScheduler.class,
ResourceScheduler.class);
conf.setBoolean(
YarnConfiguration.OPPORTUNISTIC_CONTAINER_ALLOCATION_ENABLED, true);
conf.setInt(
YarnConfiguration.NM_CONTAINER_QUEUING_SORTING_NODES_INTERVAL_MS, 100);
startRM(conf);
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
@Before
public void createAndStartRM() {
CapacitySchedulerConfiguration csConf =
new CapacitySchedulerConfiguration();
YarnConfiguration conf = new YarnConfiguration(csConf);
conf.setClass(YarnConfiguration.RM_SCHEDULER, CapacityScheduler.class,
ResourceScheduler.class);
conf.set(YarnConfiguration.RM_PLACEMENT_CONSTRAINTS_HANDLER,
YarnConfiguration.PROCESSOR_RM_PLACEMENT_CONSTRAINTS_HANDLER);
conf.setInt(
YarnConfiguration.RM_PLACEMENT_CONSTRAINTS_RETRY_ATTEMPTS, 1);
startRM(conf);
}
我试图通过参数名称调用存储过程: int processId = 1; CallableStatement stmt = conn.prepareCall("{call get_process_log
这个问题已经有答案了: PreparedStatement setNull(..) (5 个回答) 已关闭 9 年前。 根据this question/answer ,这段代码: try(Prepar
编辑: 好的,假设我有注释 @X 和 @Y public class MyExampleClass{ @X @Y Integer myfield; } 我遇到的问题是当我打电话 field.set
我的 Activity (A) 是通过推送通知启动的,通过提供的 PendingIntent。如果这个 Intent 有某个键,那么我需要开始一个新的 Activity (B)。按回 B,我应该回到
遇到类似于 this question 的问题时,我开始想知道为什么我们在重写 onNewIntent 时必须显式调用 setIntent,以及为什么 super.onNewIntent 还没有执行此
本文整理了Java中bibliothek.util.xml.XElement.setInt()方法的一些代码示例,展示了XElement.setInt()的具体用法。这些代码示例主要来源于Github
我有一个简单的 SQL 语句,我想通过 执行 String tokenInsQ = "INSERT INTO pitweb.tokens (token_user_id,token_to
我正在尝试使用 prepareForSegue 在另一个 VC 上设置整数方法。我有四个按钮,每个按钮在按下时都有自己的 bool 值 - (IBAction)answerChoiceFourPres
谁能告诉我为什么这个方法不起作用? String strQuery = "Insert Into cust_subs (CustomerId,SubscriptionId) Values (?,?)"
我正在捕获执行操作的日期时间并将其设置在 SharedPreferences 中(prefs 是 SharedPreferences 的一个实例), prefs.setInt('last_action
几乎我在 Unity3D 中有一个我正在为 Android 制作的应用程序,您可以收集硬币,这是游戏的货币。每次我开始游戏时,我的硬币数量都会初始化为 0,即使我正在使用 setInt 和 getIn
我在 Eclipse 上使用 PostgreSQL 9.1 和 Tomcat 7。连接是通过连接池建立的。当我对 PreparedStatement 使用 setInt() 方法时,没有返回任何内容。
在扩展从其菜单触发一些其他 Activity 的示例 Android Activity 时,我开始在 onOptionsItemSelected 中处理一些菜单项,并且通过调用 处理一些菜单项(刚刚触
我正在开发一个按钮小部件,当用户单击按钮时我想更改资源图像,但它不起作用,这是我的代码: 小部件.xml : MyWidgetActivity.java : p
我有以下场景: 我有一个聊天 Activity ,它的目的是获取要显示消息的联系人的电子邮件,该 Activity 的启动模式为 singleTop 通过在屏幕上滑动我的手指,我可以在不同的对话之间切
我正在使用 MySQL 连接器/C++ 库将值插入到数据库表中。我正在关注 中的示例 http://dev.mysql.com/tech-resources/articles/mysql-connec
本文整理了Java中org.apache.hadoop.yarn.conf.YarnConfiguration.setInt()方法的一些代码示例,展示了YarnConfiguration.setIn
我有以下代码片段: public static void main(String[] args) throws SQLException { Connection c = getCon
我是一名优秀的程序员,十分优秀!