Hi, Jhon Thank very much for your response. this project is very interesting.
I test your jar , but no work. I think that is because i have other version of hadoop. I have installed Hadoop 2.2.0 whit YARN. the Error is Diagnostic Messages for this Task: Error: java.lang.RuntimeException: Error in configuring object at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:109) at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:75) at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133) at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:425) at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341) at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:162) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:415) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491) at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:157) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:106) ... 9 more Caused by: java.lang.RuntimeException: Error in configuring object at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:109) at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:75) at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133) at org.apache.hadoop.mapred.MapRunner.configure(MapRunner.java:38) ... 14 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:106) ... 17 more Caused by: java.lang.RuntimeException: Map operator initialization failed at org.apache.hadoop.hive.ql.exec.mr.ExecMapper.configure(ExecMapper.java:134) ... 22 more Caused by: java.lang.NullPointerException at org.apache.hadoop.hive.ql.exec.FunctionRegistry.isStateful(FunctionRegistry.java:1422) at org.apache.hadoop.hive.ql.exec.FunctionRegistry.isDeterministic(FunctionRegistry.java:1385) at org.apache.hadoop.hive.ql.exec.ExprNodeGenericFuncEvaluator.isDeterministic(ExprNodeGenericFuncEvaluator.java:132) at org.apache.hadoop.hive.ql.exec.ExprNodeEvaluatorFactory.iterate(ExprNodeEvaluatorFactory.java:83) at org.apache.hadoop.hive.ql.exec.ExprNodeEvaluatorFactory.toCachedEval(ExprNodeEvaluatorFactory.java:73) at org.apache.hadoop.hive.ql.exec.SelectOperator.initializeOp(SelectOperator.java:57) at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:377) at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:453) at org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:409) at org.apache.hadoop.hive.ql.exec.FilterOperator.initializeOp(FilterOperator.java:82) at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:377) at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:453) at org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:409) at org.apache.hadoop.hive.ql.exec.TableScanOperator.initializeOp(TableScanOperator.java:188) at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:377) at org.apache.hadoop.hive.ql.exec.MapOperator.initializeOp(MapOperator.java:425) at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:377) at org.apache.hadoop.hive.ql.exec.mr.ExecMapper.configure(ExecMapper.java:113) ... 22 more I'll try doing other test. whit other version of hadoop. if you see , why don't your jar , Quizás quisiste decir: te agradecería que me lo dijeras. I appreciate that you told me. Yhanks a lot! 2014-02-10 22:43 GMT+01:00 John Meagher <john.meag...@gmail.com>: > Here's one implementation of it: > https://github.com/livingsocial/HiveSwarm#dayofweekdate. > > The code for it is pretty straight forward: > https://github.com/livingsocial/HiveSwarm/blob/master/src/main/java/com/livingsocial/hive/udf/DayOfWeek.java > > > On Mon, Feb 10, 2014 at 4:38 PM, Stephen Sprague <sprag...@gmail.com>wrote: > >> oddly enough i don't see one here: >> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#LanguageManualUDF-DateFunctions >> >> however, you're not the only one finding something like this useful. cf. >> https://issues.apache.org/jira/browse/HIVE-6046 >> >> in the meantime it appears as though you'll have to write your own UDF or >> perhaps setup a streaming job via transform() function. >> >> Cheers, >> Stephen. >> >> PS. The transform() function is _really_ easy to use so don't be scared >> off. cf. >> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Transform >> (the last example is the simplest.) >> >> >> On Mon, Feb 10, 2014 at 8:33 AM, Eduardo Parra Valdes | BEEVA < >> eduardo.pa...@beeva.com> wrote: >> >>> Hello! all >>> I wish to find a function that returns hive day of the week (Monday, >>> Tuesday .. etc) to enter a parameter (timestamp). >>> Anyone have an idea of how to do it? >>> >>> -- >>> [image: BEEVA] >>> >>> *Eduardo Parra Valdés* >>> eduardo.pa...@beeva.com >>> >>> BEE OUR CLIENT >>> >>> WWW.BEEVA.COM <http://www.beeva.com/> >>> >>> Clara del Rey 26, 4ª planta. >>> >>> [28002] Madrid. >>> <https://www.facebook.com/somosBEEVA><http://www.linkedin.com/company/beeva><https://twitter.com/beeva_es> >>> >>> Antes de imprimir este mensaje, por favor compruebe que es necesario >>> hacerlo. >>> >>> Before you print this message please consider if it really necesary. >>> Aviso Legal: >>> Este mensaje, su contenido y cualquier fichero transmitido con él, está >>> dirigido únicamente a su destinatario y es confidencial. Por ello, se >>> informa a quien lo reciba por error o tenga conocimiento del mismo sin ser >>> su destinatario, que la información contenida en él es reservada y su uso >>> no autorizado, por lo que en tal caso le rogamos nos lo comunique por la >>> misma vía, así como que se abstenga de reproducir el mensaje mediante >>> cualquier medio o remitirlo o entregarlo a otra persona, procediendo a su >>> borrado de manera inmediata.Disclaimer: >>> This message, its content and any file attached thereto is for the >>> intended recipient only and is confidential. If you have received this >>> e-mail in error or had access to it, you should note that the information >>> in it is private and any use thereof is unauthorised. In such an event >>> please notify us by e-mail. Any reproduction of this e-mail by whatsoever >>> means and any transmission or dissemination thereof to other persons is >>> prohibited. It should be deleted immediately from your system. >>> >> > -- [image: BEEVA] *Eduardo Parra Valdés* eduardo.pa...@beeva.com BEE OUR CLIENT WWW.BEEVA.COM <http://www.beeva.com/> Clara del Rey 26, 4ª planta. [28002] Madrid. <https://www.facebook.com/somosBEEVA><http://www.linkedin.com/company/beeva><https://twitter.com/beeva_es> Antes de imprimir este mensaje, por favor compruebe que es necesario hacerlo. Before you print this message please consider if it really necesary. Aviso Legal: Este mensaje, su contenido y cualquier fichero transmitido con él, está dirigido únicamente a su destinatario y es confidencial. Por ello, se informa a quien lo reciba por error o tenga conocimiento del mismo sin ser su destinatario, que la información contenida en él es reservada y su uso no autorizado, por lo que en tal caso le rogamos nos lo comunique por la misma vía, así como que se abstenga de reproducir el mensaje mediante cualquier medio o remitirlo o entregarlo a otra persona, procediendo a su borrado de manera inmediata.Disclaimer: This message, its content and any file attached thereto is for the intended recipient only and is confidential. If you have received this e-mail in error or had access to it, you should note that the information in it is private and any use thereof is unauthorised. In such an event please notify us by e-mail. Any reproduction of this e-mail by whatsoever means and any transmission or dissemination thereof to other persons is prohibited. It should be deleted immediately from your system.