hadoop - 编译Pig Bank UDF错误

标签 hadoop apache-pig

构建文件:C:\ my \ work \ PigBank \ contrib \ piggybank \ java \ build.xml

init:

compile:
     [echo]  *** Compiling Pig UDFs ***
    [javac] Compiling 159 source files to C:\my\work\PigBank\contrib\piggybank\java\build\classes
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
    [javac] C:\my\work\PigBank\contrib\piggybank\java\src\main\java\org\apache\pig\piggybank\evaluation\IsInt.j
    [javac]  * Note this function checks for Integer range 鈭?,147,483,648 to 2,147,483,647.
    [javac]                                                 ^
    [javac] 1 error
    [javac] 1 warning

BUILD FAILED

最佳答案

  • 确保在基本目录
  • 上运行ant
  • 然后打开:PigBank\contrib\piggybank\java\src\main\java\org\apache\pig\piggybank\evaluation\IsInt.java并编辑第31行:
    29 /**
    30 * This UDF is used to check whether the String input is an Integer.
    31 * Note this function checks for Integer range −2,147,483,648 to 2,147,483,647.
    32 * If range is not important, use IsNumeric instead if you would like to check if     a String 33 is numeric. 
    34 * Also IsNumeric performs slightly better compared to this function.
    35 */
    
  • 只需删除第48列上的不可打印字符并保存文件即可。
  • 再次运行ant命令。
  • 关于hadoop - 编译Pig Bank UDF错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9717502/

    相关文章:

    apache-pig - 'group as' 在 Pig 中是如何工作的?

    hadoop - 如何重命名关系中的字段

    java - .pig 脚本与 java 嵌入式 pig : Which one is the fastest?

    java - 无法提交并发的Hadoop作业

    java - 无法在 Ubuntu 上启动 Hive

    python - 在 Pig 中将关系传递给 Python UDF 时出错

    hadoop - pig : CONCAT A relation OUTPUT to another RELATION

    hadoop - Hive:有没有办法自定义 hiveInputFormat?

    xml - 为什么 YARN 上会有 mapreduce.jobtracker.address 配置?

    java - mac vist docker hadoop hdfs datanode失败