Hadoop分布式模式(Hadoop distributed mode)
这个问题可能看起来非常微不足道,但我是Hadoop的新手,目前对一个问题感到困惑。
启动守护进程时,如何在从属节点上放置相应的文件?
我知道您在相应的文件中指定了主服务器和从服务器,但是它如何知道该节点的文件系统上的位置(安装Hadoop的路径)?
我应该为此设置类似HADOOP_HOME(或HADOOP_PREFIX)的东西吗?
另外,我在master文件中读到你只指定了Secondary Name节点,而Name节点和Job Tracker被认为位于你调用start-all.sh的节点上。 但是,如果您没有登录该节点,而是另一个客户端节点,会发生什么? 也许我不太了解那部分......
This question may seem very trivial, but I'm new to Hadoop and currently confused by one question.
When starting the daemons, how can the appropriate files be located on the slave nodes?
I know you specify the masters and the slaves in the appropriate files, but how does it know about the location on the file system of that nodes(the path to where Hadoop is installed)?
Should I perhaps setup something like HADOOP_HOME (or HADOOP_PREFIX) for that?
Also, I read that in masters file you specify only the Secondary Name Node, while the Name Node and Job Tracker are considered to be located on the node from which your are calling start-all.sh. But what happens if you're not logged on that node, but on the other, client node? Maybe I didn't understand that part well...
原文:https://stackoverflow.com/questions/30737172
最满意答案
case 0: Intent i=new Intent(getApplicationContext(),General_report.class); startActivity(i); break; case 1: Intent i1=new Intent(getApplicationContext(),Ipd_report.class); startActivity(i1); break; case 2: Intent i11=new Intent(getApplicationContext(),Opd_report.class); startActivity(i11); break;
你错过了
break;
case:
后陈述case:
case 0: Intent i=new Intent(getApplicationContext(),General_report.class); startActivity(i); break; case 1: Intent i1=new Intent(getApplicationContext(),Ipd_report.class); startActivity(i1); break; case 2: Intent i11=new Intent(getApplicationContext(),Opd_report.class); startActivity(i11); break;
You missed
break;
statement aftercase:
相关问答
更多-
Listeners在java代码中可以。 问题在于xml。 你的父布局是RelativeLayout ,你有使用规则android:layout_below 。 在某些地方,您使用了"@id而不是"@+id 。 所以这会使观点重叠。 在所有android:layout_below标记android:layout_below其写为"@+id并从根布局中移除android:onClick="onClick" ,看看它是否有效。 建议 : - 如果您的所有小部件都垂直对齐,则使用垂直方向的LinearLayout ...
-
如果您将在oncreate函数上使用try catch块,那么您将会发现问题是类型转换异常,即应用程序无法将org.opencv活动类强制转换为您的活动。 所以相反,如果我对类型化进行类型转换,如果我输入强制转换MainActivity.this,问题就解决了。 很简单,但我花了很多时间才弄明白。 If you will use try catch block on the oncreate function then you will come to know that the problem is of ...
-
Android提供了一个用于测试活动的特殊检测框架。 您必须使用此框架,因为活动具有复杂的生命周期,在此提供的框架之外是不可调用的。 查看Android文档的Development部分中的Testing链接,查看Activity Testing 。 如果这不能回答你的问题,你可能会稍微改一下。 编辑 你应该真正扩展ActivityUnitTestCase来测试一个Activity,而不是AndroidTestCase。 您将获得更多针对您需要测试的功能。 如果扩展ActivityUnitTestCase,则 ...
-
基于switch案例没有在android中正确调用活动[关闭](based on the switch case not calling activity properly in android [closed])[2023-03-23]
case 0: Intent i=new Intent(getApplicationContext(),General_report.class); startActivity(i); break; case 1: Intent i1=new Intent(getApplicationContext(),Ipd_report.class); startActivity(i1); break; case 2: Intent i11=new Intent(getAppli ... -
无法调用第二个Activity(Trouble calling second Activity)[2021-09-23]
你的按钮不正确。 通过这样做,您将onClick侦听器分配给永远不可见的按钮。 而不是做 Button openButton = new Button(this); 您应该尝试通过执行找到现有布局中的按钮 Button openButton = (Button)findViewById(R.id.openButton); 将R.id.openButton替换为您在R.layout.shiftselection布局文件中指定按钮的ID 现在你正在创建一个新按钮,然后永远不会将它附加到布局,所以它永远不 ... -
在Android应用中切换案例(Switch case in Android app)[2023-03-24]
这是你的问题: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); View continueButton = findViewById(R.id.continue_button); continueButton.setOnClickListener(this); ... -
希望这应该有效。 创建一个模型类,它将保存家庭成员的名称和图像,如下所示 - public class FamilyMember { private String name; private int imageResource; public FamilyMember(String name, int imageResource) { this.name = name; this.imageResource = imageResource; ...
-
侧视图不一定填满整个屏幕,并且不可能一次显示多个活动。 所以我建议使用Fragments。 The side views don't necessarily fill the entire screen and it is impossible to display multiple Activities at once. So I recommend using Fragments.
-
希望它有用〜 适配器 class CustomAdapter extends FragmentPagerAdapter { private final String[] TITLES = {"A", "B"}; private final String TAG = CustomAdapter.class.getSimpleName(); private final ArrayList
mFragments; private final FragmentManager fm; pub ... -
切换字符串值是Java 7的语言特性,并且在Android中不完全支持(有些已经使它工作,但需要对工具进行一些操作),如果您使用ADT,则需要Java 5或6。 因此,在字符串差异之间进行选择最好使用if-else,即 Uri path = Uri.parse(o.getPath()); if ( path.getLastPathSegment().contains(".txt") ) { //TXT File } else if ( path.getLastPathSegment().contai ...