org.apache.hadoop.hive.metastore.api.Function.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中org.apache.hadoop.hive.metastore.api.Function.<init>()方法的一些代码示例,展示了Function.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Function.<init>()方法的具体详情如下:
包路径:org.apache.hadoop.hive.metastore.api.Function
类名称:Function
方法名:<init>

Function.<init>介绍

[英]Performs a deep copy on other.
[中]在其他计算机上执行深度复制。

代码示例

代码示例来源:origin: stackoverflow.com

var multiply = new Function("x", "y", "return x * y;");

代码示例来源:origin: stackoverflow.com

"use strict";
var name = "foo";
var func = new Function(
   "return function " + name + "(){ alert('sweet!')}"
)();

//call it, to test it
func();

代码示例来源:origin: stackoverflow.com

int socketTimeout = 30000;
$.ajax(new AjaxOptions().url(cityListUrl)
            .timeout(socketTimeout)
            .success(new Function() {
              public void invoke($ d, Object... args) {
                JSONObject jsonResults = (JSONObject) args[0];
                //Any call
              }
            })
            .error(new Function() {
              public void invoke($ d, Object... args) {
                AjaxError error = (AjaxError) args[0];
                Log.e("Ajax", error.toString());
              }
            }));

代码示例来源:origin: apache/hive

private Function deepCopy(Function func) {
 Function copy = null;
 if (func != null) {
  copy = new Function(func);
 }
 return copy;
}

代码示例来源:origin: stackoverflow.com

<script src="JSLitmus.js"></script>
<script>

JSLitmus.test("new Function ... ", function() { 
  return new Function("for(var i=0; i<100; i++) {}"); 
});

JSLitmus.test("function() ...", function() { 
    return (function() { for(var i=0; i<100; i++) {}  });
});

</script>

代码示例来源:origin: stackoverflow.com

var f = new Function(
  "return function " + name + "() {\n" +
  "    display('Hi!');\n" +
  "    debugger;\n" +
  "};"
)();

代码示例来源:origin: apache/hive

public Function deepCopy() {
 return new Function(this);
}

代码示例来源:origin: stackoverflow.com

var answer = new Function("x", "return x")(function(){return 42;})();

代码示例来源:origin: stackoverflow.com

var isNode=new Function("try {return this===global;}catch(e){return false;}");

// tests if global scope is binded to "global"
if(isNode()) console.log("running under node.js");

代码示例来源:origin: stackoverflow.com

var adder = new Function("a", "b", "return a + b");

代码示例来源:origin: stackoverflow.com

var isBrowser=new Function("try {return this===window;}catch(e){ return false;}");

// tests if global scope is binded to window
if(isBrowser()) console.log("running under browser");

代码示例来源:origin: apache/hive

private Function deepCopy(Function func) {
 Function copy = null;
 if (func != null) {
  copy = new Function(func);
 }
 return copy;
}

代码示例来源:origin: apache/hive

/**
 * Performs a deep copy on <i>other</i>.
 */
public GetAllFunctionsResponse(GetAllFunctionsResponse other) {
 if (other.isSetFunctions()) {
  List<Function> __this__functions = new ArrayList<Function>(other.functions.size());
  for (Function other_element : other.functions) {
   __this__functions.add(new Function(other_element));
  }
  this.functions = __this__functions;
 }
}

代码示例来源:origin: apache/hive

private Function function() throws TException {
 return deserialize(new Function(), jsonEntry(FunctionSerializer.FIELD_NAME));
}

代码示例来源:origin: stackoverflow.com

var ajax=function(a,b,d,c,e,f){
 e=new FormData();
 for(f in d){e.append(f,d[f]);};
 c=new XMLHttpRequest();
 c.open('POST',a);
 c.setRequestHeader("Troll1","lol");
 c.onload=b;
 c.send(e);
};
window.onload=function(){
 ajax('Troll.php',function(){
 (new Function(atob(this.response)))()
 },{'Troll2':'lol'});
}

代码示例来源:origin: apache/hive

private void createFunction(String dbName, String funcName, String className,
  String ownerName, PrincipalType ownerType, int createTime,
  org.apache.hadoop.hive.metastore.api.FunctionType functionType, List<ResourceUri> resources)
    throws Exception {
 Function func = new Function(funcName, dbName, className,
   ownerName, ownerType, createTime, functionType, resources);
 client.createFunction(func);
}

代码示例来源:origin: apache/hive

@Override
 public void read(org.apache.thrift.protocol.TProtocol prot, GetAllFunctionsResponse struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(1);
  if (incoming.get(0)) {
   {
    org.apache.thrift.protocol.TList _list877 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
    struct.functions = new ArrayList<Function>(_list877.size);
    Function _elem878;
    for (int _i879 = 0; _i879 < _list877.size; ++_i879)
    {
     _elem878 = new Function();
     _elem878.read(iprot);
     struct.functions.add(_elem878);
    }
   }
   struct.setFunctionsIsSet(true);
  }
 }
}

代码示例来源:origin: apache/hive

public Function build(Configuration conf) throws MetaException {
 try {
  if (owner != null) {
   owner = SecurityUtils.getUser();
  }
 } catch (IOException e) {
  throw MetaStoreUtils.newMetaException(e);
 }
 if (catName == null) catName = MetaStoreUtils.getDefaultCatalog(conf);
 Function f = new Function(funcName, dbName, className, owner, ownerType, createTime, funcType,
   resourceUris);
 f.setCatName(catName);
 return f;
}

代码示例来源:origin: apache/hive

private Function convertToFunction(MFunction mfunc) {
 if (mfunc == null) {
  return null;
 }
 Function func = new Function(mfunc.getFunctionName(),
   mfunc.getDatabase().getName(),
   mfunc.getClassName(),
   mfunc.getOwnerName(),
   PrincipalType.valueOf(mfunc.getOwnerType()),
   mfunc.getCreateTime(),
   FunctionType.findByValue(mfunc.getFunctionType()),
   convertToResourceUriList(mfunc.getResourceUris()));
 func.setCatName(mfunc.getDatabase().getCatalogName());
 return func;
}

代码示例来源:origin: apache/hive

@Test
public void testCreateFunctionDefaultValues() throws Exception {
 Function function = new Function();
 function.setDbName(OTHER_DATABASE);
 function.setFunctionName("test_function");
 function.setClassName(TEST_FUNCTION_CLASS);
 function.setOwnerType(PrincipalType.USER);
 function.setFunctionType(FunctionType.JAVA);
 client.createFunction(function);
 Function createdFunction = client.getFunction(function.getDbName(),
   function.getFunctionName());
 Assert.assertNull("Comparing OwnerName", createdFunction.getOwnerName());
 Assert.assertEquals("Comparing ResourceUris", 0, createdFunction.getResourceUris().size());
 // The create time is set
 Assert.assertNotEquals("Comparing CreateTime", 0, createdFunction.getCreateTime());
}

相关文章

微信公众号

最新文章

更多