The reason that code no longer works is that it's syntax from the H2O 2.0 API, which has been retired for about a year or longer. Since H2O 3.0,
h2o.clusterInfo() no longer has arguments and
as.h2o() no longer has the
key argument. Check out the documentation for these functions inside your H2O R package, or here and here.