보물창고/Big Data2015.08.23 23:30





flume error 해결 org.apache.hadoop.io.LongWritable"org.apache.hadoop.io.BytesWritable



해결에 참고한 내용



입력되는 값
문자열이 탭으로 구분된 데이터

sfae a;ldfja;sldj alwkejhfalskdhf a;slekjafabcd def de
ab d eef ddefsef
sfae a;ldfja;sldj alwkejhfalskdhf a;slekjafabcd def de
ab d eef ddefsef
sfae a;ldfja;sldj alwkejhfalskdhf a;slekjafabcd def de
ab d eef ddefsef
sfae a;ldfja;sldj alwkejhfalskdhf a;slekjaabcd def de
ab d eef ddefsef
sfae a;ldfja;sldj alwkejhfalskdhf a;slekjafabcd def de
ab d eef ddefsef
sfae a;ldfja;sldj alwkejhfalskdhf a;slekjaf
sfae a;ldfja;sldj alwkejhfalskdhf a;slekjafabcd def de
ab d eef ddefsef
sfae a;ldfja;sldj alwkejhfalskdhf a;slekjafabcd def de
ab d eef ddefsef
sfae a;ldfja;sldj alwkejhfalskdhf a;slekjafabcd def de
ab d eef ddefsef
sfae a;ldfja;sldj alwkejhfalskdhf a;slekjaabcd def de
ab d eef ddefsef
sfae a;ldfja;sldj alwkejhfalskdhf a;slekjafabcd def de





 에러로 출력되는 결과
SEQ!org.apache.hadoop.io.LongWritable"org.apache.hadoop.io.BytesWritable      €藪???pR??      NC+?   abcd def de      NC+?   ab d eef ddefsef   8    NC+?   ,sfae a;ldfja;sldj alwkejhfalskdhf a;slekjaf      NC+?   abcd    def     de   +    NC+?   ab      d       eef     ddefsef   O    NC+?   Csfae    a;ldfja;sldj    alwkejhfalskdhf a;slekjafabcd    def     de   +    NC+?   ab      d       eef     ddefsef   O    NC+?   Csfae    a;ldfja;sldj    alwkejhfalskdhf a;slekjafabcd    def     de   +    NC+?   ab      d       eef     ddefsef   O    NC+?   Csfae    a;ldfja;sldj    alwkejhfalskdhf a;slekjafabcd    def     de








아래 설정에서 파란색 라인을 추가 하는 것으로 해결됨

agent.sources = logfilereadSource
agent.channels = memoryChannel
agent.sinks = loggerSink

# source
# For each one of the sources, the type is defined
agent.sources.logfilereadSource.type = exec
agent.sources.logfilereadSource.command = tail -F /home/hadoop/download/flumeTestfile.log
agent.sources.logfilereadSource.batchSize = 10
agent.sources.logfilereadSource.channels = memoryChannel

# channel
agent.channels.memoryChannel.type = memory
agent.channels.memoryChannel.capacity = 20480


# Sink
#Specify the channel the sink should use
agent.sinks.loggerSink.type = hdfs
agent.sinks.loggerSink.channel = memoryChannel
agent.sinks.loggerSink.hdfs.path = hdfs://localhost:8020/user/admin/flumetest/log
agent.sinks.loggerSink.hdfs.fileType = DataStream
agent.sinks.loggerSink.serializer = com.adaltas.flume.serialization.HeaderAndBodyTextEventSerializer$Builder
agent.sinks.loggerSink.serializer.format = CSV
agent.sinks.loggerSink.serializer.appendNewline = true
agent.sinks.loggerSink.serializer.delimiter = '\t'


위 설정 추가후

ab d eef ddefsef sfae a;ldfja;sldj alwkejhfalskdhf a;slekjafabcd def de ab d eef ddefsef sfae a;ldfja;sldj alwkejhfalskdhf a;slekjafabcd def de ab d eef ddefsef sfae a;ldfja;sldj alwkejhfalskdhf a;slekjaabcd def de ab d eef ddefsef sfae a;ldfja;sldj alwkejhfalskdhf a;slekjafabcd def de ab d eef ddefsef sfae a;ldfja;sldj alwkejhfalskdhf a;slekjaf





신고





Posted by 파란물
보물창고/Programming2011.09.22 22:46







안드로이드 에러, 디바이스에서는 되는데 에뮬에서 안될때 [android, error, device]

안드로이드 에러 중 디바이스에서는 잘 되다가 에뮬에서 안될때 한번쯤 확인 해볼 사항 입니다









 

09-22 07:56:28.315: ERROR/AndroidRuntime(813): FATAL EXCEPTION: main

09-22 07:56:28.315: ERROR/AndroidRuntime(813): java.lang.RuntimeException: Unable to start activity ComponentInfo{ibm.cw.f5/ibm.cw.f5.TestJSActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class android.widget.LinearLayout

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1622)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1638)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at android.app.ActivityThread.access$1500(ActivityThread.java:117)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:928)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at android.os.Handler.dispatchMessage(Handler.java:99)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at android.os.Looper.loop(Looper.java:123)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at android.app.ActivityThread.main(ActivityThread.java:3647)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at java.lang.reflect.Method.invokeNative(Native Method)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at java.lang.reflect.Method.invoke(Method.java:507)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at dalvik.system.NativeStart.main(Native Method)

09-22 07:56:28.315: ERROR/AndroidRuntime(813): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class android.widget.LinearLayout

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at android.view.LayoutInflater.createView(LayoutInflater.java:518)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at android.view.LayoutInflater.inflate(LayoutInflater.java:386)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at android.view.LayoutInflater.inflate(LayoutInflater.java:320)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at android.view.LayoutInflater.inflate(LayoutInflater.java:276)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at android.app.Activity.setContentView(Activity.java:1657)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at ibm.cw.f5.TestJSActivity.onCreate(TestJSActivity.java:34)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1586)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     ... 11 more

09-22 07:56:28.315: ERROR/AndroidRuntime(813): Caused by: java.lang.reflect.InvocationTargetException

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at java.lang.reflect.Constructor.constructNative(Native Method)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at java.lang.reflect.Constructor.newInstance(Constructor.java:415)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at android.view.LayoutInflater.createView(LayoutInflater.java:505)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     ... 21 more

09-22 07:56:28.315: ERROR/AndroidRuntime(813): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:450)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:326)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at android.content.res.Resources.loadDrawable(Resources.java:1709)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at android.content.res.TypedArray.getDrawable(TypedArray.java:601)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at android.view.View.<init>(View.java:1951)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at android.view.View.<init>(View.java:1899)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at android.view.ViewGroup.<init>(ViewGroup.java:286)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     at android.widget.LinearLayout.<init>(LinearLayout.java:120)

09-22 07:56:28.315: ERROR/AndroidRuntime(813):     ... 24 more

 


디바이스에서는 되는데 에뮬에서 안되면고 위와 같은 에러를 표시하고 있었습니다.
에러가 정확하게 해석되지 않아 차근차근 하나씩 확인하면서 보니 이미지 해상도에 문제가 있었습니다.










배경과 버튼으로 사용할 이미지 해상도가 화면에 보이는것보다 1.5배에서 3배 이상 크게 만들었던게 문제였습니다


 

원래 필요 했던 이미지 사이즈


 

제작된 이미지 사이즈(클릭하시면 원래 큰 사이즈를 볼 수 있습니다)




이미지가 워낙 크다보니 xml레이아웃에서도 제대로 보이지 않아 이상하다 생각 했었습니다. 사이즈를 정확하게 줄이고 나니 레이아웃에도 정확하게 표시되고 에뮬에서도 에러없이 샐행 하는 모습을 볼 수 있었습니다

혹시나 에뮬에서 확인 안되는 에러나 나타난다면 확인해 보세요!



신고





Posted by 파란물