  We combine the kinematics of 159 globular clusters (GCs) provided by the Gaia
Early Data Release 3 (EDR3) with other observational data to classify the GCs,
and to estimate the mass of the Milky Way (MW). We use the age-metallicity
relation, integrals of motion, action space and the GC orbits to identify the
GCs as either formed in-situ (Bulge and Disk) or ex situ (via accretion). We
find that $45.3\%$ have formed in situ, $38.4\%$ may be related to known merger
events: Gaia-Sausage-Enceladus, the Sagittarius dwarf galaxy, the Helmi
streams, the Sequoia galaxy, and the Kraken galaxy. We also further identify
three new sub-structures associated with the Gaia-Sausage-Enceladus. The
remaining $16.3\%$ of GCs are unrelated to the known mergers and thought to be
from small accretion events. We select 46 GCs which have radii $8.0<r<37.3$ kpc
and obtain the anisotropy parameter $\beta=0.315_{-0.049}^{+0.055}$, which is
lower than the recent result using the sample of GCs in Gaia Data Release 2,
but still in agreement with it by considering the error bar. By using the same
sample, we obtain the MW mass inside the outermost GC as $M(<37.3
kpc)=0.423_{-0.02}^{+0.02}\times10^{12}M_{\odot}$, and the corresponding
$M_{200}=1.11_{-0.18}^{+0.25}\times10^{12}M_{\odot}$. The estimated mass is
consistent with the results in many recent studies. We also find that the
estimated $\beta$ and mass depend on the selected sample of GCs. However, it is
difficult to determine whether a GC fully traces the potential of the MW.
