Blame | Last modification | View Log | RSS feed
<?php#指派命名空間namespace qbpwcf{#匯入專屬SOAP的套件include("../allInOne.php");#提示執行的函數echo "<hr>hive::query - testCase 1<p>";/*#涵式說明:#執行hiveSQL#回傳結果:#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.#$result["functin"],字串,當前函數的名稱.#$result["error"],陣列,錯訊訊息.#$result["content"],執行完query的回傳內容.#$result["cmd"],執行的指令.#必填參數:#$conf["sql"],字串,要執行的sql字串.$conf["sql"]="show databases";#$conf["beeline"],字串,beeline程式的位置.$conf["beeline"]="beeline";#$conf["userName"],字串,執行beeline程式的使用者名稱.$conf["userName"]="liveuser";#$conf["userPass"],字串,執行beeline程式的使用者名稱對應的密碼.$conf["userPass"]="password";#可省略參數:#$conf["fileArgu"],字串.__FILE__的內容,若省略,則為伺服器上該檔案的位置.#$conf["fileArgu"]=__FILE__#備註:#尚未測試...var_dump(hive::query($conf));unset($conf);*/#提示執行的函數echo "<hr>hive::getDtData - testCase 1<p>";/*#涵式說明:#執行hiveSQL,取得資料表資料.#回傳結果:#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.#$result["functin"],字串,當前函數的名稱.#$result["error"],陣列,錯訊訊息.#$result["content"],執行完query的回傳內容.#$result["cmd"],執行的指令.#必填參數:#$conf["beeline"],字串,beeline程式的位置.$conf["beeline"]="/home/liveuser/hadoop-2.7.2/bin/beeline";#$conf["dbName"],字串,要取得資料表資料的目標資料庫名稱.$conf["dbName"]="test";#$conf["dtName"],字串,要取得資料的目標資料表名稱.$conf["dtName"]="pokes";#可省略參數:#$conf["fileArgu"],字串.__FILE__的內容,若省略,則為伺服器上該檔案的位置.#$conf["fileArgu"]=__FILE__#$conf["userName"],字串,執行beeline程式的使用者名稱.#$conf["userName"]="liveuser";#$conf["userPass"],字串,執行beeline程式的使用者名稱對應的密碼.#$conf["userPass"]="password";#備註:#建構中...var_dump(hive::getDtData($conf));unset($conf);*/#提示執行的函數echo "<hr>hive::nativeQuery - testCase 1<p>";#/*#函數說明:#apache hive官方提供的PHP API#回傳結果:#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.#$result["functin"],字串,當前函數的名稱.#$result["error"],陣列,錯訊訊息.#$result["content"],執行完query的回傳內容.#$result["qStr"],查詢的語句.#必填參數:#$conf["thrift_root"],字串,存有 hive 散布的 php THRIFT_ROOT 路徑.$conf["thrift_root"]="lib/apache-hive";#可省略參數:#$conf["fileArgu"],字串,__FILE__的內容,預設為__FILE__.#$conf["fileArgu"]=__FILE__;#備註:#建構中...var_dump(hive::nativeQuery($conf));#*/}#namespace includeV5 end?>