我希望能够Scala在我的本地IDE中编写,然后将其部署到AWS Glue,作为构建过程的一部分.但是我很难找到构建GlueAppAWS生成的骨架所需的库.
在AWS-java的SDK胶不含进口类,我无法找到那些库其他地方.虽然它们必须存在于某个地方,但它们可能只是这个库的Java/Scala端口:aws-glue-libs
来自AWS的模板scala代码:
import com.amazonaws.services.glue.GlueContext
import com.amazonaws.services.glue.MappingSpec
import com.amazonaws.services.glue.errors.CallSite
import com.amazonaws.services.glue.util.GlueArgParser
import com.amazonaws.services.glue.util.Job
import com.amazonaws.services.glue.util.JsonOptions
import org.apache.spark.SparkContext
import scala.collection.JavaConverters._
object GlueApp {
def main(sysArgs: Array[String]) {
val spark: SparkContext = new SparkContext()
val glueContext: GlueContext = new GlueContext(spark)
// @params: [JOB_NAME]
val args = GlueArgParser.getResolvedOptions(sysArgs, Seq("JOB_NAME").toArray)
Job.init(args("JOB_NAME"), glueContext, args.asJava)
// @type: DataSource
// @args: [database = "raw-tickers-oregon", table_name = "spark_delivery_2_1", transformation_ctx = "datasource0"]
// @return: datasource0
// @inputs: []
val datasource0 = …Run Code Online (Sandbox Code Playgroud) I am a newbie with a quick fix but trust me, I have searched all the forums thoroughly and haven't found the solution to this scenario. I am using quick fix 1.6 libs. I have a FIX message which has got a repeating group. When I send this message using sendToTarget() method, the message is forwarded to the FIX server without issues, but the fields get reordered due to which exchange rejects it. Reading through the posts, I got to …
我想使用java的fork join模型实现bitonic排序.这是分拣机的代码
import java.util.concurrent.RecursiveAction;
public class BitonicSortTask extends RecursiveAction
{
private final int array[];
private final int low;
private final int high;
private final int dir;
public BitonicSortTask(int array[],int low,int high,int dir)
{
this.array = array;
this.low = low;
this.high = high;
this.dir= dir;
}
@Override
protected void compute()
{
if(high>1)
{
int temp = high/2;
BitonicSortTask left = new BitonicSortTask(array, low, temp,1);
BitonicSortTask right = new BitonicSortTask(array, temp+1,high,0);
invokeAll(left, right);
BitonicMerge(array, low, high, dir);
}
}
private void BitonicMerge(int[] …Run Code Online (Sandbox Code Playgroud)