MaxCompute SQL UDF: after you have prepared UDF, you need to upload the compiled jar package to ODPS as resource. While running this UDF, MaxCompute will automatically download the jar package and get the user’s code. To upload the jar package is a course to create ODPS resource, so jar package is a kind of ODPS recource.
MaxCompute MapReduce: after you have prepared MapReduce program, you need to upload the compiled jar package as a resource to MaxCompute. While running the MapReduce job, MapReduce framerwork will automatically download the jar resource and get the user’s code. You also can upload the text file and tables as different types of resources to MaxCompute. UDF or MapReduce program can read these resources in running worker.MaxCompute provides an interface to read and use the resource. For details, refer to Use Resourse Example and UDTF Usage . It should be noted that the user-defined function UDF of ODPS or MapReduce has certain application restrictions on the reading of resources. Refer to Application Restriction .
Types of MaxCompute resources include:
- Table: tables in ODPS.
- Jar: compiled Java Jar package;
- Archive: recognize the compression type according to the postfix in the resource name. The supported compressed file types include: .zip/.tgz/.tar.gz/.tar/jar；