Why does spark need to directly depend on thrift?