提交 1db91147 authored 作者: Thomas Mueller's avatar Thomas Mueller

Formatting

上级 3effa5c1
......@@ -137,7 +137,12 @@ abstract class ScriptBase extends Prepared implements DataHandler {
// always use a big buffer, otherwise end-of-block is written a lot
out = new BufferedOutputStream(out, Constants.IO_BUFFER_SIZE_COMPRESS);
} else {
OutputStream o = FileUtils.newOutputStream(file, false);
OutputStream o;
try {
o = FileUtils.newOutputStream(file, false);
} catch (IOException e) {
throw DbException.convertIOException(e, null);
}
out = new BufferedOutputStream(o, Constants.IO_BUFFER_SIZE);
out = CompressTool.wrapOutputStream(out, compressionAlgorithm, SCRIPT_SQL);
}
......
......@@ -93,7 +93,7 @@ public class FunctionIndex extends BaseIndex {
public long getDiskSpaceUsed() {
return 0;
}
public String getPlanSQL() {
return "function";
}
......
......@@ -157,10 +157,12 @@ public interface Index extends SchemaObject {
long getRowCountApproximation();
/**
* @return the estimated number of bytes of disk space used by this page and all child pages.
* Get the used disk space for this index.
*
* @return the estimated number of bytes
*/
long getDiskSpaceUsed();
/**
* Compare two rows.
*
......
......@@ -100,7 +100,7 @@ public class MetaIndex extends BaseIndex {
public long getDiskSpaceUsed() {
return meta.getDiskSpaceUsed();
}
public String getPlanSQL() {
return "meta";
}
......
......@@ -305,7 +305,7 @@ public class MultiVersionIndex implements Index {
public long getDiskSpaceUsed() {
return base.getDiskSpaceUsed();
}
public Index getBaseIndex() {
return base;
}
......
......@@ -303,7 +303,7 @@ public class PageBtreeIndex extends PageIndex {
public long getDiskSpaceUsed() {
return tableData.getDiskSpaceUsed();
}
public long getRowCount(Session session) {
return rowCount;
}
......
......@@ -89,7 +89,9 @@ abstract class PageData extends Page {
abstract void setRowCountStored(int rowCount);
/**
* @return the estimated number of bytes of disk space used by this page and all child pages.
* Get the used disk space for this index.
*
* @return the estimated number of bytes
*/
abstract long getDiskSpaceUsed();
......@@ -234,7 +236,7 @@ abstract class PageData extends Page {
// to how much memory a row needs on average
return memoryEstimated;
}
int getParentPageId() {
return parentPageId;
}
......
......@@ -431,7 +431,7 @@ public class PageDataIndex extends PageIndex {
PageData root = getPage(rootPageId, 0);
return root.getDiskSpaceUsed();
}
public String getCreateSQL() {
return null;
}
......
......@@ -454,7 +454,7 @@ public class PageDataLeaf extends PageData {
long getDiskSpaceUsed() {
return index.getPageStore().getPageSize();
}
public void write() {
writeData();
index.getPageStore().writePage(getPos(), data);
......
......@@ -120,7 +120,7 @@ public class PageDelegateIndex extends PageIndex {
public long getDiskSpaceUsed() {
return mainIndex.getDiskSpaceUsed();
}
public void writeRowCount() {
// ignore
}
......
......@@ -235,7 +235,7 @@ public class ScanIndex extends BaseIndex {
public long getDiskSpaceUsed() {
return 0;
}
public String getPlanSQL() {
return table.getSQL() + ".tableScan";
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论