0
xml에서 두 노드를 처리 할 수 있습니다. 그리고 아래의 출력을 얻고있다 :첫 번째 행을 열 한정자 이름으로 출력하는 방법
bin/hadoop fs -text /user/root/t-output1/part-r-00000
name:ST17925 currentgrade 1.02
name:ST17926 currentgrade 3.0
name:ST17927 currentgrade 3.0
을하지만 같은 출력이 필요합니다 :
studentid curentgrade
ST17925 1.02
ST17926 3.00
ST17927 3.00
가 어떻게 이것을 달성 할 수 있습니까?
내 완전한 소스 코드 : https://github.com/studhadoop/xml/blob/master/XmlParser11.java
편집 : 솔루션
protected void setup(Context context) throws IOException, InterruptedException {
context.write(new Text("studentid"), new Text("currentgrade"));
}
k 괜찮습니다. 답장을 보내 주셔서 감사합니다. setup() 메서드를 사용했습니다. –
좋습니다. 코드를 살펴볼 수 있습니까? – Rags
ys.pasted abv (해결 방법) –