2012-03-15 88 views
0

構建文件:C:\我的\工作\ PigBank \的contrib \撲滿\ java的\ build.xml文件編譯豬的UDF銀行錯誤

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 

回答

0
  1. 就基本目錄確保運行Ant

  2. 然後打開: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 */ 
    
    1. 只是刪除關於第48欄的不可打印字符並保存文件。
    2. 再次運行ant命令。