You are right Nitin, I am working on it and will use methods which are supported in java 6.
From: Nitin Mehta Sent: Wednesday, March 27, 2013 3:39 PM To: Sanjay Tripathi; Sateesh Chodapuneedi; mice xia; Min Chen; Devdeep Singh Cc: David Nalley; cloudstack Subject: Re: Review Request: CLOUDSTACK-1156: Limit Primary and Secondary storage for domain/accounts I don't think you should be using a method introduced in 7.0 since its not gonna work with someone using version 6.0 From: Sanjay Tripathi <sanjay.tripa...@citrix.com<mailto:sanjay.tripa...@citrix.com>> Date: Wednesday 27 March 2013 3:21 PM To: Nitin Mehta <nitin.me...@citrix.com<mailto:nitin.me...@citrix.com>>, Sateesh Chodapuneedi <sateesh.chodapune...@citrix.com<mailto:sateesh.chodapune...@citrix.com>>, "mice_...@tcloudcomputing.com<mailto:mice_...@tcloudcomputing.com>" <mice_...@tcloudcomputing.com<mailto:mice_...@tcloudcomputing.com>>, Min Chen <min.c...@citrix.com<mailto:min.c...@citrix.com>>, Devdeep Singh <devdeep.si...@citrix.com<mailto:devdeep.si...@citrix.com>> Cc: David Nalley <da...@gnsa.us<mailto:da...@gnsa.us>>, "cloudstack-...@incubator.apache.org<mailto:cloudstack-...@incubator.apache.org>" <cloudstack-...@incubator.apache.org<mailto:cloudstack-...@incubator.apache.org>> Subject: RE: Review Request: CLOUDSTACK-1156: Limit Primary and Secondary storage for domain/accounts Nitin, In my setup I am not facing any compilation issues, Can you check the java version in you system. In my setup I am using jdk 1.7. And the method "getContentLengthLong()" is supported since 7.0 under the class URLConnection. This is the description of the method that I have used: getContentLengthLong public long getContentLengthLong() Returns the value of the content-length header field as a long. Returns: the content length of the resource that this connection's URL references, or -1 if the content length is not known. Since: 7.0 --Sanjay From: Nitin Mehta Sent: Wednesday, March 27, 2013 2:22 PM To: Sanjay Tripathi; Sateesh Chodapuneedi; mice xia; Min Chen; Devdeep Singh Cc: David Nalley; cloudstack Subject: Re: Review Request: CLOUDSTACK-1156: Limit Primary and Secondary storage for domain/accounts I get the following error on running mvn clean install [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 9.373s [INFO] Finished at: Wed Mar 27 14:20:41 GMT+05:30 2013 [INFO] Final Memory: 18M/81M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project cloud-utils: Compilation failure: Compilation failure: [ERROR] /Users/nitinmehta/apache/incubator-cloudstack/utils/src/com/cloud/utils/UriUtils.java:[95,37] cannot find symbol [ERROR] symbol : method getContentLengthLong() [ERROR] location: class java.net.HttpURLConnection [ERROR] /Users/nitinmehta/apache/incubator-cloudstack/utils/src/com/cloud/utils/UriUtils.java:[99,38] cannot find symbol [ERROR] symbol : method getContentLengthLong() [ERROR] location: class javax.net.ssl.HttpsURLConnection [ERROR] -> [Help 1] From: Sanjay Tripathi <sanjay.tripa...@citrix.com<mailto:sanjay.tripa...@citrix.com>> Reply-To: Sanjay Tripathi <sanjay.tripa...@citrix.com<mailto:sanjay.tripa...@citrix.com>> Date: Wednesday 27 March 2013 11:30 AM To: Sateesh Chodapuneedi <sateesh.chodapune...@citrix.com<mailto:sateesh.chodapune...@citrix.com>>, "mice_...@tcloudcomputing.com<mailto:mice_...@tcloudcomputing.com>" <mice_...@tcloudcomputing.com<mailto:mice_...@tcloudcomputing.com>>, Min Chen <min.c...@citrix.com<mailto:min.c...@citrix.com>>, Nitin Mehta <nitin.me...@citrix.com<mailto:nitin.me...@citrix.com>>, Devdeep Singh <devdeep.si...@citrix.com<mailto:devdeep.si...@citrix.com>> Cc: David Nalley <da...@gnsa.us<mailto:da...@gnsa.us>>, "cloudstack-...@incubator.apache.org<mailto:cloudstack-...@incubator.apache.org>" <cloudstack-...@incubator.apache.org<mailto:cloudstack-...@incubator.apache.org>>, Sanjay Tripathi <sanjay.tripa...@citrix.com<mailto:sanjay.tripa...@citrix.com>> Subject: Re: Review Request: CLOUDSTACK-1156: Limit Primary and Secondary storage for domain/accounts This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/9541/ Review request for cloudstack, Devdeep Singh, Nitin Mehta, Sateesh Chodapuneedi, mice xia, and Min Chen. By Sanjay Tripathi. Updated March 27, 2013, 6 a.m. Changes updated patch, in sync with the latest code. Description CLOUDSTACK-1156: Limit Primary and Secondary storage for domain/accounts Addition of two new resource types i.e. Primary and Secondary storage space in the existing pool of resource types. Added methods to set the limits on these resources using updateResourceLimit API command and to get a count using updateResourceCount. Also added calls in the Templates, Volumes, Snapshots life cycle to check these limits and to increment/decrement the new resource types Resource Name :: Resource type number Primary Storage 10 Secondary Storage 11 Also added jUnit Tests for the same. Testing Tested life cycle of templates, volumes, snapshots, vm on my local CloudStack setup. Bugs: CLOUDSTACK-1156 Diffs (updated) * api/src/com/cloud/configuration/Resource.java (7614c8a) * api/src/com/cloud/storage/VolumeApiService.java (8517988) * api/src/org/apache/cloudstack/api/command/user/resource/UpdateResourceCountCmd.java (f6d3a98) * api/src/org/apache/cloudstack/api/command/user/resource/UpdateResourceLimitCmd.java (0039f62) * api/src/org/apache/cloudstack/api/command/user/volume/ResizeVolumeCmd.java (955727a) * api/src/org/apache/cloudstack/api/response/AccountResponse.java (9a98a35) * api/src/org/apache/cloudstack/api/response/ResourceCountResponse.java (a7fbbf2) * api/src/org/apache/cloudstack/api/response/ResourceLimitResponse.java (b444e7a) * plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalTemplateAdapter.java (33725f6) * server/src/com/cloud/alert/AlertManagerImpl.java (a45482f) * server/src/com/cloud/api/ApiResponseHelper.java (663139d) * server/src/com/cloud/api/query/dao/AccountJoinDaoImpl.java (898bafc) * server/src/com/cloud/api/query/vo/AccountJoinVO.java (cd7231c) * server/src/com/cloud/configuration/Config.java (9db7dbd) * server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java (23c0796) * server/src/com/cloud/storage/VolumeManager.java (af3cbbf) * server/src/com/cloud/storage/VolumeManagerImpl.java (737ed0a) * server/src/com/cloud/storage/dao/SnapshotDao.java (0e378a7) * server/src/com/cloud/storage/dao/SnapshotDaoImpl.java (825b6d5) * server/src/com/cloud/storage/dao/VolumeDao.java (d7a2667) * server/src/com/cloud/storage/dao/VolumeDaoImpl.java (40ed875) * server/src/com/cloud/storage/download/DownloadListener.java (d4c20cf) * server/src/com/cloud/storage/download/DownloadMonitorImpl.java (0bc89e3) * server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java (bacca01) * server/src/com/cloud/template/HypervisorTemplateAdapter.java (1426421) * server/src/com/cloud/template/TemplateManagerImpl.java (d843dbc) * server/src/com/cloud/vm/UserVmManagerImpl.java (82a69bd) * server/test/com/cloud/resourcelimit/ResourceLimitManagerImplTest.java (d311ad3) * server/test/com/cloud/vpc/MockResourceLimitManagerImpl.java (b9fc861) * setup/db/db/schema-40to410.sql (60ad025) * setup/db/db/schema-410to420.sql (eb650cc) * utils/src/com/cloud/utils/UriUtils.java (a8b5ccb) View Diff<https://reviews.apache.org/r/9541/diff/>