hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nanda kumar (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDDS-1080) Ozonefs Isolated class loader should support FsStorageStatistics
Date Tue, 12 Feb 2019 09:22:00 GMT

     [ https://issues.apache.org/jira/browse/HDDS-1080?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Nanda kumar updated HDDS-1080:
------------------------------
       Resolution: Fixed
    Fix Version/s: 0.4.0
           Status: Resolved  (was: Patch Available)

Thanks [~elek] for the contribution and [~anu] for reviewing. Committed this to trunk.

> Ozonefs Isolated class loader should support FsStorageStatistics
> ----------------------------------------------------------------
>
>                 Key: HDDS-1080
>                 URL: https://issues.apache.org/jira/browse/HDDS-1080
>             Project: Hadoop Distributed Data Store
>          Issue Type: Improvement
>          Components: Ozone Filesystem
>            Reporter: Elek, Marton
>            Assignee: Elek, Marton
>            Priority: Major
>             Fix For: 0.4.0
>
>         Attachments: HDDS-1080.001.patch
>
>
> HDDS-1033 introduced the storage statistics for ozonefs. Unfortunately the isolated classloader
(HDDS-922) doesn't work any more after this change.
> To explain the problem, let's use the specific expression _classname[classloader]_ for
a class (named by classname) which is loaded by the classloader.
> We have two classloaders the _main_ which is the standard classloader of the application
and the _isolated_ classloader which is created by the OzoneClientAdapterFactory.java.
> By default java classloaders delegate the loading to the parent class loader, and they
load all the classes from the parent first (if possible). The isolated class loader does the
oposit, loads all the classes from a specific location of the jar files. With this approach
we can use hadoop3.2+ozone classes together with older hadoop versions.
> But back to the problem:
> OzoneFilesystem[main] is loaded by the application. In this class an OzoneFSStorageStatistics[main]
is created and with the help of OzoneClientAdapterFactory[main] a new OzoneClientAdapterImpl[isolated!!]
is instantiated which implements the OzoneClientAdapter[main] and will do all the main work[isolated].
> OzoneClientAdapterImp[isolated] has a new constructor which requires (String[system],
String[system], OzoneFSStorageStatistics[isolated]). 
> And this is the problem, it requires OzoneFSStorageStatistics[isolated] but we have a
 OzoneFSStorageStatistics[main].
> The fix is very straightforward. In the FilteredClassLoader.java we ha a list for the
classes which should be shared by the two classloaders. For these classes the isolated classloader
will delegate the loading to the parent ([main]) classloader and we will have one (and only
one) OzoneFSStorageStatistics[main] everywhere.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message