user3508652 user3508652 - 27 days ago 6
Scala Question

scala.MatchError on Dataframe Mapping to RDD

I am running scala 2.11.8 and spark 2.0

notesTokenized.head(1).foreach(println)
notesTokenized.printSchema()
println(notesTokenized)
val lda_countVector = notesTokenized.rdd.map { case Row(id: Long, features: Vector) => (id, features)
lda_countVector.take(5).foreach(println)


The output is

[10077,(47613,[0,1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20,21,22,23,24,25,27,28,29,31,32,33,34,35,36,37,38,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,65,66,67,68,69,70,72,73,74,75,76,78,79,80,81,84,85,86,87,88,89,90,91,92,93,94,95,96,98,99,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,122,123,124,125,126,127,128,129,130,131,134,135,136,137,138,139,141,142,143,144,145,146,147,148,149,151,152,153,154,155,156,157,158,160,161,162,164,165,166,167,169,170,171,172,173,174,175,176,177,178,179,180,182,183,184,187,188,189,190,193,194,195,196,197,198,200,201,202,203,204,206,207,209,210,211,212,213,215,216,217,218,219,222,223,224,225,226,227,228,229,230,231,232,235,236,238,239,240,241,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,259,260,263,266,268,269,270,271,273,274,275,276,278,279,282,283,286,287,289,290,293,294,295,296,297,298,300,301,302,303,304,305,306,307,308,309,310,311,313,314,315,316,317,319,322,323,324,325,327,328,330,331,333,334,335,336,337,339,343,344,346,347,349,350,351,352,353,354,356,357,358,359,360,361,363,364,366,367,368,370,372,373,375,376,377,379,380,382,383,385,386,388,391,393,394,398,399,401,402,404,405,408,410,413,415,417,418,419,420,422,423,424,426,428,429,430,431,432,434,436,437,438,439,443,445,446,447,448,449,452,455,456,457,458,461,462,463,465,466,467,468,470,471,472,474,475,477,478,479,480,482,483,484,485,486,487,490,492,494,497,498,499,501,506,509,510,511,513,514,517,518,520,521,526,527,529,533,538,540,541,543,544,547,549,552,553,555,556,559,560,563,564,565,566,568,569,571,573,575,578,579,581,583,584,585,586,589,590,591,592,594,595,596,598,600,601,602,603,604,605,607,609,612,615,617,619,623,625,626,627,628,629,630,632,634,637,638,639,641,643,645,649,654,655,658,660,661,666,672,676,679,680,682,683,684,687,688,691,692,693,694,696,699,700,701,702,705,706,708,710,712,715,716,717,718,719,722,724,726,728,729,731,733,734,746,747,748,750,753,754,756,757,758,764,765,767,770,771,772,777,780,783,785,788,790,792,793,795,797,798,799,801,806,809,813,815,817,820,825,827,831,834,835,836,843,845,853,856,861,863,866,868,869,873,874,875,877,878,879,881,884,886,889,894,903,904,905,909,911,912,913,915,920,925,928,931,936,938,939,941,946,948,949,951,952,953,954,959,962,963,964,965,968,970,975,977,981,983,985,986,987,989,995,996,1008,1010,1012,1014,1016,1019,1022,1024,1025,1027,1032,1033,1037,1046,1048,1050,1052,1060,1061,1063,1068,1069,1071,1073,1075,1077,1079,1089,1090,1096,1101,1102,1106,1109,1110,1111,1112,1114,1118,1119,1120,1121,1122,1126,1127,1129,1131,1133,1134,1136,1140,1143,1152,1153,1156,1158,1160,1164,1166,1169,1173,1175,1177,1181,1185,1186,1187,1189,1190,1194,1195,1196,1198,1200,1202,1203,1204,1208,1211,1215,1220,1221,1228,1229,1230,1231,1237,1253,1256,1257,1261,1270,1273,1280,1282,1283,1287,1288,1292,1299,1304,1305,1308,1310,1313,1315,1316,1322,1337,1346,1347,1350,1354,1355,1359,1360,1361,1367,1368,1376,1381,1382,1385,1386,1387,1388,1396,1399,1402,1406,1413,1420,1430,1439,1441,1445,1447,1450,1452,1456,1461,1463,1464,1467,1469,1472,1476,1483,1487,1491,1495,1498,1500,1501,1503,1504,1505,1506,1507,1512,1520,1527,1528,1530,1532,1533,1535,1539,1546,1554,1561,1568,1572,1576,1577,1578,1580,1584,1593,1600,1601,1604,1605,1612,1613,1616,1620,1622,1631,1636,1638,1640,1645,1646,1654,1661,1671,1675,1677,1679,1690,1691,1693,1694,1696,1704,1706,1707,1715,1716,1724,1740,1749,1751,1754,1755,1758,1763,1766,1768,1773,1780,1781,1782,1783,1793,1797,1799,1801,1806,1811,1828,1837,1844,1850,1851,1858,1859,1863,1865,1875,1878,1880,1883,1898,1899,1900,1903,1904,1907,1910,1915,1919,1924,1925,1929,1930,1932,1933,1937,1938,1939,1943,1946,1950,1954,1957,1959,1967,1970,1973,1974,1978,1979,1995,2000,2002,2010,2014,2015,2020,2022,2035,2037,2040,2045,2052,2055,2056,2065,2082,2088,2106,2112,2113,2117,2119,2133,2135,2140,2147,2159,2168,2172,2178,2183,2186,2190,2214,2219,2222,2224,2225,2226,2231,2232,2243,2251,2260,2265,2267,2269,2273,2287,2290,2293,2298,2308,2313,2315,2319,2323,2334,2341,2347,2350,2352,2354,2356,2358,2367,2368,2369,2383,2400,2414,2415,2418,2433,2455,2461,2468,2470,2476,2483,2485,2508,2516,2524,2528,2534,2538,2550,2552,2554,2557,2578,2582,2583,2588,2604,2609,2612,2620,2640,2642,2643,2651,2658,2676,2679,2683,2685,2687,2689,2690,2691,2693,2701,2702,2711,2713,2723,2729,2730,2732,2733,2734,2738,2740,2745,2747,2749,2761,2769,2785,2795,2796,2807,2816,2818,2838,2840,2846,2847,2848,2850,2854,2868,2875,2878,2883,2884,2904,2905,2908,2910,2915,2936,2965,2969,3001,3003,3006,3046,3059,3086,3093,3097,3099,3108,3135,3143,3145,3147,3168,3170,3181,3204,3222,3228,3234,3242,3249,3254,3263,3275,3279,3281,3312,3315,3320,3322,3335,3343,3346,3348,3349,3364,3372,3373,3378,3381,3386,3425,3465,3481,3487,3497,3499,3515,3518,3526,3567,3568,3575,3580,3586,3589,3603,3618,3619,3645,3655,3667,3677,3686,3690,3693,3700,3759,3769,3777,3784,3788,3811,3836,3837,3847,3883,3895,3908,3916,3945,3960,4025,4043,4074,4149,4166,4214,4228,4240,4256,4260,4268,4293,4297,4313,4360,4370,4378,4408,4417,4425,4471,4477,4491,4526,4605,4617,4624,4626,4628,4650,4668,4680,4693,4699,4737,4750,4794,4800,4819,4826,4883,4889,4914,4940,4948,4956,4958,4990,4992,4995,4997,5022,5041,5056,5057,5062,5071,5076,5083,5096,5106,5172,5175,5212,5220,5237,5248,5304,5321,5363,5375,5427,5434,5552,5591,5629,5634,5666,5691,5728,5739,5740,5768,5839,5903,5927,5931,5932,5958,5972,6004,6024,6025,6039,6057,6058,6071,6124,6127,6147,6212,6273,6277,6292,6387,6422,6462,6568,6714,6770,6804,6825,6826,6833,6868,6955,6958,6996,7059,7111,7128,7129,7200,7216,7229,7242,7368,7519,7537,7547,7570,7669,7686,7691,7848,7879,7884,7904,7985,8030,8040,8179,8199,8211,8229,8417,8433,8495,8506,8597,8616,8674,8710,8718,8739,8757,8759,8841,8844,8996,9017,9041,9173,9199,9204,9205,9310,9340,9341,9466,9469,9637,9748,9837,9936,10037,10064,10361,10403,10407,10478,10505,10530,10588,10687,10802,10836,10882,11120,11270,11352,11462,11597,11615,11643,11692,11708,11750,11760,11946,12024,12307,12411,13307,13375,13387,13508,13537,13675,13900,13920,13921,14270,14378,14631,14642,14663,14794,14873,15140,15325,15758,15767,16174,16295,16395,16652,16674,17716,17868,17908,18230,18387,18882,18925,19014,20147,20358,20541,20624,20956,21245,21252,22536,22699,22874,23123,23248,23492,23560,23626,28937,32008,32234,33046,34683,34926,35193,35228,35541,39112,39290,39684,39932,40223,42952,43430,44009,46163],[133.0,34.0,13.0,11.0,5.0,7.0,23.0,25.0,6.0,1.0,3.0,17.0,25.0,12.0,14.0,1.0,1.0,21.0,1.0,10.0,13.0,11.0,6.0,11.0,13.0,2.0,6.0,3.0,3.0,32.0,13.0,1.0,33.0,18.0,1.0,14.0,4.0,8.0,18.0,5.0,1.0,4.0,11.0,22.0,6.0,2.0,2.0,31.0,2.0,2.0,3.0,9.0,19.0,24.0,3.0,4.0,9.0,6.0,1.0,5.0,10.0,12.0,15.0,5.0,2.0,5.0,15.0,30.0,24.0,16.0,7.0,4.0,2.0,7.0,1.0,27.0,2.0,8.0,1.0,4.0,4.0,22.0,9.0,2.0,2.0,26.0,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1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0])]
root
|-- id: long (nullable = true)
|-- features: vector (nullable = true)

[id: bigint, features: vector]


The error I am getting at map (which is line 116) is:

scala.MatchError: [10077,(47613,[0,1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20,21,22,23,24,25,27,28,29,31,32,33,34,35,36,37,38,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,65,66,67,68,69,70,72,73,74,75,76,78,79,80,81,84,85,86,87,88,89,90,91,92,93,94,95,96,98,99,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,122,123,124,125,126,127,128,129,130,131,134,135,136,137,138,139,141,142,143,144,145,146,147,148,149,151,152,153,154,155,156,157,158,160,161,162,164,165,166,167,169,170,171,172,173,174,175,176,177,178,179,180,182,183,184,187,188,189,190,193,194,195,196,197,198,200,201,202,203,204,206,207,209,210,211,212,213,215,216,217,218,219,222,223,224,225,226,227,228,229,230,231,232,235,236,238,239,240,241,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,259,260,263,266,268,269,270,271,273,274,275,276,278,279,282,283,286,287,289,290,293,294,295,296,297,298,300,301,302,303,304,305,306,307,308,309,310,311,313,314,315,316,317,319,322,323,324,325,327,328,330,331,333,334,335,336,337,339,343,344,346,347,349,350,351,352,353,354,356,357,358,359,360,361,363,364,366,367,368,370,372,373,375,376,377,379,380,382,383,385,386,388,391,393,394,398,399,401,402,404,405,408,410,413,415,417,418,419,420,422,423,424,426,428,429,430,431,432,434,436,437,438,439,443,445,446,447,448,449,452,455,456,457,458,461,462,463,465,466,467,468,470,471,472,474,475,477,478,479,480,482,483,484,485,486,487,490,492,494,497,498,499,501,506,509,510,511,513,514,517,518,520,521,526,527,529,533,538,540,541,543,544,547,549,552,553,555,556,559,560,563,564,565,566,568,569,571,573,575,578,579,581,583,584,585,586,589,590,591,592,594,595,596,598,600,601,602,603,604,605,607,609,612,615,617,619,623,625,626,627,628,629,630,632,634,637,638,639,641,643,645,649,654,655,658,660,661,666,672,676,679,680,682,683,684,687,688,691,692,693,694,696,699,700,701,702,705,706,708,710,712,715,716,717,718,719,722,724,726,728,729,731,733,734,746,747,748,750,753,754,756,757,758,764,765,767,770,771,772,777,780,783,785,788,790,792,793,795,797,798,799,801,806,809,813,815,817,820,825,827,831,834,835,836,843,845,853,856,861,863,866,868,869,873,874,875,877,878,879,881,884,886,889,894,903,904,905,909,911,912,913,915,920,925,928,931,936,938,939,941,946,948,949,951,952,953,954,959,962,963,964,965,968,970,975,977,981,983,985,986,987,989,995,996,1008,1010,1012,1014,1016,1019,1022,1024,1025,1027,1032,1033,1037,1046,1048,1050,1052,1060,1061,1063,1068,1069,1071,1073,1075,1077,1079,1089,1090,1096,1101,1102,1106,1109,1110,1111,1112,1114,1118,1119,1120,1121,1122,1126,1127,1129,1131,1133,1134,1136,1140,1143,1152,1153,1156,1158,1160,1164,1166,1169,1173,1175,1177,1181,1185,1186,1187,1189,1190,1194,1195,1196,1198,1200,1202,1203,1204,1208,1211,1215,1220,1221,1228,1229,1230,1231,1237,1253,1256,1257,1261,1270,1273,1280,1282,1283,1287,1288,1292,1299,1304,1305,1308,1310,1313,1315,1316,1322,1337,1346,1347,1350,1354,1355,1359,1360,1361,1367,1368,1376,1381,1382,1385,1386,1387,1388,1396,1399,1402,1406,1413,1420,1430,1439,1441,1445,1447,1450,1452,1456,1461,1463,1464,1467,1469,1472,1476,1483,1487,1491,1495,1498,1500,1501,1503,1504,1505,1506,1507,1512,1520,1527,1528,1530,1532,1533,1535,1539,1546,1554,1561,1568,1572,1576,1577,1578,1580,1584,1593,1600,1601,1604,1605,1612,1613,1616,1620,1622,1631,1636,1638,1640,1645,1646,1654,1661,1671,1675,1677,1679,1690,1691,1693,1694,1696,1704,1706,1707,1715,1716,1724,1740,1749,1751,1754,1755,1758,1763,1766,1768,1773,1780,1781,1782,1783,1793,1797,1799,1801,1806,1811,1828,1837,1844,1850,1851,1858,1859,1863,1865,1875,1878,1880,1883,1898,1899,1900,1903,1904,1907,1910,1915,1919,1924,1925,1929,1930,1932,1933,1937,1938,1939,1943,1946,1950,1954,1957,1959,1967,1970,1973,1974,1978,1979,1995,2000,2002,2010,2014,2015,2020,2022,2035,2037,2040,2045,2052,2055,2056,2065,2082,2088,2106,2112,2113,2117,2119,2133,2135,2140,2147,2159,2168,2172,2178,2183,2186,2190,2214,2219,2222,2224,2225,2226,2231,2232,2243,2251,2260,2265,2267,2269,2273,2287,2290,2293,2298,2308,2313,2315,2319,2323,2334,2341,2347,2350,2352,2354,2356,2358,2367,2368,2369,2383,2400,2414,2415,2418,2433,2455,2461,2468,2470,2476,2483,2485,2508,2516,2524,2528,2534,2538,2550,2552,2554,2557,2578,2582,2583,2588,2604,2609,2612,2620,2640,2642,2643,2651,2658,2676,2679,2683,2685,2687,2689,2690,2691,2693,2701,2702,2711,2713,2723,2729,2730,2732,2733,2734,2738,2740,2745,2747,2749,2761,2769,2785,2795,2796,2807,2816,2818,2838,2840,2846,2847,2848,2850,2854,2868,2875,2878,2883,2884,2904,2905,2908,2910,2915,2936,2965,2969,3001,3003,3006,3046,3059,3086,3093,3097,3099,3108,3135,3143,3145,3147,3168,3170,3181,3204,3222,3228,3234,3242,3249,3254,3263,3275,3279,3281,3312,3315,3320,3322,3335,3343,3346,3348,3349,3364,3372,3373,3378,3381,3386,3425,3465,3481,3487,3497,3499,3515,3518,3526,3567,3568,3575,3580,3586,3589,3603,3618,3619,3645,3655,3667,3677,3686,3690,3693,3700,3759,3769,3777,3784,3788,3811,3836,3837,3847,3883,3895,3908,3916,3945,3960,4025,4043,4074,4149,4166,4214,4228,4240,4256,4260,4268,4293,4297,4313,4360,4370,4378,4408,4417,4425,4471,4477,4491,4526,4605,4617,4624,4626,4628,4650,4668,4680,4693,4699,4737,4750,4794,4800,4819,4826,4883,4889,4914,4940,4948,4956,4958,4990,4992,4995,4997,5022,5041,5056,5057,5062,5071,5076,5083,5096,5106,5172,5175,5212,5220,5237,5248,5304,5321,5363,5375,5427,5434,5552,5591,5629,5634,5666,5691,5728,5739,5740,5768,5839,5903,5927,5931,5932,5958,5972,6004,6024,6025,6039,6057,6058,6071,6124,6127,6147,6212,6273,6277,6292,6387,6422,6462,6568,6714,6770,6804,6825,6826,6833,6868,6955,6958,6996,7059,7111,7128,7129,7200,7216,7229,7242,7368,7519,7537,7547,7570,7669,7686,7691,7848,7879,7884,7904,7985,8030,8040,8179,8199,8211,8229,8417,8433,8495,8506,8597,8616,8674,8710,8718,8739,8757,8759,8841,8844,8996,9017,9041,9173,9199,9204,9205,9310,9340,9341,9466,9469,9637,9748,9837,9936,10037,10064,10361,10403,10407,10478,10505,10530,10588,10687,10802,10836,10882,11120,11270,11352,11462,11597,11615,11643,11692,11708,11750,11760,11946,12024,12307,12411,13307,13375,13387,13508,13537,13675,13900,13920,13921,14270,14378,14631,14642,14663,14794,14873,15140,15325,15758,15767,16174,16295,16395,16652,16674,17716,17868,17908,18230,18387,18882,18925,19014,20147,20358,20541,20624,20956,21245,21252,22536,22699,22874,23123,23248,23492,23560,23626,28937,32008,32234,33046,34683,34926,35193,35228,35541,39112,39290,39684,39932,40223,42952,43430,44009,46163],[133.0,34.0,13.0,11.0,5.0,7.0,23.0,25.0,6.0,1.0,3.0,17.0,25.0,12.0,14.0,1.0,1.0,21.0,1.0,10.0,13.0,11.0,6.0,11.0,13.0,2.0,6.0,3.0,3.0,32.0,13.0,1.0,33.0,18.0,1.0,14.0,4.0,8.0,18.0,5.0,1.0,4.0,11.0,22.0,6.0,2.0,2.0,31.0,2.0,2.0,3.0,9.0,19.0,24.0,3.0,4.0,9.0,6.0,1.0,5.0,10.0,12.0,15.0,5.0,2.0,5.0,15.0,30.0,24.0,16.0,7.0,4.0,2.0,7.0,1.0,27.0,2.0,8.0,1.0,4.0,4.0,22.0,9.0,2.0,2.0,26.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0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0])]

(of class org.apache.spark.sql.catalyst.expressions.GenericRowWithSchema)
at com.tera.topic.features.FeatureConstruction$$anonfun$1.apply(FeatureConstruction.scala:116)
at com.tera.topic.features.FeatureConstruction$$anonfun$1.apply(FeatureConstruction.scala:116)
at scala.collection.Iterator$$anon$11.next(Iterator.scala:409)


The first element of data frame notesTokenized is Long and second is a Vector, I am not sure what the error is.

Answer

This might be a namespace conflict:

The Vector type in the DataFrame is probably a org.apache.spark.mllib.linalg.Vector while the Vector we are trying to match in the function is a scala.collection.immutable.Vector

Comments