Sparkピット記録
3165 ワード
Encoders.bean(Person.class)コール異常
Exception in thread "main" java.lang.UnsupportedOperationException: Cannot infer type for class personal.leo.spark.Person because it is not bean-compliant
public class Person implements Serializable {
private String name;
private int age;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
}
public class Person implements Serializable {
private String name;
private int age;
public String getName() {
return name;
}
public Person setName(String name) {
this.name = name;
return this;
}
public int getAge() {
return age;
}
public Person setAge(int age) {
return this;
this.age = age;
}
}