Advertisement
NLinker

spark

Nov 24th, 2017
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 1.66 KB | None | 0 0
  1.       import spark.implicits._
  2.       implicit val enc: Encoder[(Long, UUID)] = tupleEncoder
  3.       val ds1: Dataset[(Long,UUID)] = Seq(
  4.         (313091L, UUID.fromString("05e5570c-b562-3d68-9a94-02f5cf2b42e1")),
  5.         (313101L, UUID.fromString("0573bcd3-19f3-3db0-96ca-ded30ee4509b")),
  6.         (313109L, UUID.fromString("058ec146-f86a-3169-81b2-1cadc6ad186f")),
  7.         (278164271L, UUID.fromString("05ffd55c-fd93-3748-b5e5-57194e6891b0")),
  8.         (1277353955L, UUID.fromString("05c434b9-ece8-36d6-8787-1befdfd17a8c")),
  9.         (3908350L, UUID.fromString("05c8bf96-e65c-3ea4-8426-b06a51f6eb0f"))
  10.       ).toDS
  11.       val ds2: Dataset[(Long,UUID)] = Seq(
  12.         (1287552888L, UUID.fromString("050d5118-53dc-3454-bcdf-c2eba4d01dea")),
  13.         (1282608172L, UUID.fromString("052d1f68-ed43-3e58-bc78-5ffb43972816")),
  14.         (315473472L, UUID.fromString("0541f606-73e9-30ed-a229-d06e3f3e0921")),
  15.         (315971472L, UUID.fromString("0513eefd-dc24-34b5-9ece-89bdfdf985ef")),
  16.         (288325066L, UUID.fromString("052b7bf9-c2f5-3e4f-b0f3-97ca0aeadaa5")),
  17.         (314833704L, UUID.fromString("05ee3184-a3b8-35c3-bc50-a0a9e790e457"))
  18.       ).toDS
  19.       val ds3: Dataset[(Long,UUID)] = Seq(
  20.         (1040033272L, UUID.fromString("05e469c3-ef68-310a-8514-7416e36467f1")),
  21.         (1113173592L, UUID.fromString("055dd247-992f-3827-912e-091f1c67ca2d")),
  22.         (1256460648L, UUID.fromString("05666146-0258-33e8-85f3-44cea3653ec3")),
  23.         (440302520L, UUID.fromString("05cc7f7f-64ac-3ebd-9fc1-74daa5bfea6b")),
  24.         (1281088273L, UUID.fromString("053bb72b-3ce7-329c-bebb-531306201e8e")),
  25.         (1281088274L, UUID.fromString("051e5667-3a00-39a6-9ff1-ec816cef13b7"))
  26.       ).toDS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement