|
@@ -566,6 +566,7 @@ bool CWsDfuEx::onDFUSpace(IEspContext &context, IEspDFUSpaceRequest & req, IEspD
|
|
|
i++;
|
|
|
}
|
|
|
|
|
|
+ double version = context.getClientVersion();
|
|
|
IArrayOf<IEspDFUSpaceItem> SpaceItems;
|
|
|
for(; i < SpaceItems64.length();i++)
|
|
|
{
|
|
@@ -575,20 +576,35 @@ bool CWsDfuEx::onDFUSpace(IEspContext &context, IEspDFUSpaceRequest & req, IEspD
|
|
|
|
|
|
StringBuffer buf;
|
|
|
Owned<IEspDFUSpaceItem> item1 = createDFUSpaceItem("","");
|
|
|
+
|
|
|
+ __int64 numOfFiles = item64.getNumOfFilesInt();
|
|
|
+ __int64 numOfFilesIntUnknown = item64.getNumOfFilesIntUnknown();
|
|
|
+ __int64 totalSize = item64.getTotalSizeInt();
|
|
|
+ __int64 largestSize = item64.getLargestSizeInt();
|
|
|
+ __int64 smallestSize = item64.getSmallestSizeInt();
|
|
|
+ if (version >= 1.38)
|
|
|
+ {
|
|
|
+ item1->setNumOfFilesInt64(numOfFiles);
|
|
|
+ item1->setNumOfFilesUnknownInt64(numOfFilesIntUnknown);
|
|
|
+ item1->setTotalSizeInt64(totalSize);
|
|
|
+ item1->setLargestSizeInt64(largestSize);
|
|
|
+ item1->setSmallestSizeInt64(smallestSize);
|
|
|
+ }
|
|
|
+
|
|
|
item1->setName(item64.getName());
|
|
|
- buf << comma(item64.getNumOfFilesInt());
|
|
|
+ buf << comma(numOfFiles);
|
|
|
item1->setNumOfFiles(buf.str());
|
|
|
buf.clear();
|
|
|
- buf << comma(item64.getNumOfFilesIntUnknown());
|
|
|
+ buf << comma(numOfFilesIntUnknown);
|
|
|
item1->setNumOfFilesUnknown(buf.str());
|
|
|
buf.clear();
|
|
|
- buf << comma(item64.getTotalSizeInt());
|
|
|
+ buf << comma(totalSize);
|
|
|
item1->setTotalSize(buf.str());
|
|
|
buf.clear();
|
|
|
- buf << comma(item64.getLargestSizeInt());
|
|
|
+ buf << comma(largestSize);
|
|
|
item1->setLargestSize(buf.str());
|
|
|
buf.clear();
|
|
|
- buf << comma(item64.getSmallestSizeInt());
|
|
|
+ buf << comma(smallestSize);
|
|
|
item1->setSmallestSize(buf.str());
|
|
|
item1->setLargestFile(item64.getLargestFile());
|
|
|
item1->setSmallestFile(item64.getSmallestFile());
|
|
@@ -1849,13 +1865,14 @@ void CWsDfuEx::getFilePartsOnClusters(IEspContext &context, const char* clusterR
|
|
|
IPartDescriptor& part = pi->query();
|
|
|
unsigned partIndex = part.queryPartIndex();
|
|
|
|
|
|
+ __int64 size = -1;
|
|
|
StringBuffer partSizeStr;
|
|
|
IPropertyTree* partPropertyTree = &part.queryProperties();
|
|
|
if (!partPropertyTree)
|
|
|
partSizeStr.set("<N/A>");
|
|
|
else
|
|
|
{
|
|
|
- __uint64 size = partPropertyTree->getPropInt64("@size");
|
|
|
+ size = partPropertyTree->getPropInt64("@size", -1);
|
|
|
comma c4(size);
|
|
|
partSizeStr<<c4;
|
|
|
|
|
@@ -1873,6 +1890,8 @@ void CWsDfuEx::getFilePartsOnClusters(IEspContext &context, const char* clusterR
|
|
|
Owned<IEspDFUPart> FilePart = createDFUPart("","");
|
|
|
FilePart->setId(partIndex+1);
|
|
|
FilePart->setPartsize(partSizeStr.str());
|
|
|
+ if (version >= 1.38)
|
|
|
+ FilePart->setPartSizeInt64(size);
|
|
|
FilePart->setIp(b.str());
|
|
|
FilePart->setCopy(i+1);
|
|
|
|
|
@@ -1968,6 +1987,8 @@ void CWsDfuEx::doGetFileDetails(IEspContext &context, IUserDescriptor* udesc, co
|
|
|
|
|
|
FileDetails.setDescription(strDesc);
|
|
|
|
|
|
+ if (version >= 1.38)
|
|
|
+ FileDetails.setFileSizeInt64(size);
|
|
|
comma c1(size);
|
|
|
StringBuffer tmpstr;
|
|
|
tmpstr<<c1;
|
|
@@ -1997,20 +2018,29 @@ void CWsDfuEx::doGetFileDetails(IEspContext &context, IUserDescriptor* udesc, co
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if (version >= 1.38)
|
|
|
+ FileDetails.setRecordSizeInt64(recordSize);
|
|
|
comma c2(recordSize);
|
|
|
tmpstr.clear();
|
|
|
tmpstr<<c2;
|
|
|
FileDetails.setRecordSize(tmpstr.str());
|
|
|
|
|
|
tmpstr.clear();
|
|
|
+ __int64 recordCount = -1;
|
|
|
if (df->queryAttributes().hasProp("@recordCount"))
|
|
|
{
|
|
|
- comma c3(df->queryAttributes().getPropInt64("@recordCount"));
|
|
|
- tmpstr<<c3;
|
|
|
+ recordCount = df->queryAttributes().getPropInt64("@recordCount");
|
|
|
}
|
|
|
else if (recordSize)
|
|
|
{
|
|
|
- comma c3(size/recordSize);
|
|
|
+ recordCount = size/recordSize;
|
|
|
+ }
|
|
|
+ if (version >= 1.38)
|
|
|
+ FileDetails.setRecordCountInt64(recordCount);
|
|
|
+
|
|
|
+ if (recordCount != -1)
|
|
|
+ {
|
|
|
+ comma c3(recordCount);
|
|
|
tmpstr<<c3;
|
|
|
}
|
|
|
FileDetails.setRecordCount(tmpstr.str());
|
|
@@ -2171,6 +2201,9 @@ void CWsDfuEx::doGetFileDetails(IEspContext &context, IUserDescriptor* udesc, co
|
|
|
try
|
|
|
{
|
|
|
offset_t size=queryDistributedFileSystem().getSize(part);
|
|
|
+ if (version >= 1.38)
|
|
|
+ FilePart->setPartSizeInt64(size);
|
|
|
+
|
|
|
comma c4(size);
|
|
|
tmpstr.clear();
|
|
|
tmpstr<<c4;
|
|
@@ -2203,13 +2236,20 @@ void CWsDfuEx::doGetFileDetails(IEspContext &context, IUserDescriptor* udesc, co
|
|
|
{
|
|
|
IEspDFUFileStat& Stat = FileDetails.updateStat();
|
|
|
offset_t avg=sum/count;
|
|
|
+ offset_t minSkew = avg-mn;
|
|
|
+ offset_t maxSkew = mx-avg;
|
|
|
+ if (version >= 1.38)
|
|
|
+ {
|
|
|
+ Stat.setMinSkewInt64(minSkew);
|
|
|
+ Stat.setMaxSkewInt64(maxSkew);
|
|
|
+ }
|
|
|
|
|
|
- comma c5(avg-mn);
|
|
|
+ comma c5(minSkew);
|
|
|
tmpstr.clear();
|
|
|
tmpstr<<c5;
|
|
|
Stat.setMinSkew(tmpstr.str());
|
|
|
|
|
|
- comma c6(mx-avg);
|
|
|
+ comma c6(maxSkew);
|
|
|
tmpstr.clear();
|
|
|
tmpstr<<c6;
|
|
|
Stat.setMaxSkew(tmpstr.str());
|